P Paladium Member Licensed User Longtime User Feb 24, 2011 #1 Hi there, I got a problem with display sizes and resolutions. I own a lg optimus one with 320x480x180dpi This is what the activity looks on my device: 480px And on desire 480x800x260dpi: 800px I created other scrollviews and there it worked on bigger resolutions with no problem. Here the code in short (sample): Code: Dim br_scr1 As ScrollView Dim bra As ImageView br_scr1.Initialize(400dip) bra.Initialize("bra") Activity.LoadLayout("braillescreen") br_scr1.Panel.AddView(bra,5,5,40,60) bra.Bitmap = LoadBitmap(File.DirAssets,"br_a.png") bra.Gravity = Gravity.CENTER Can someone please help me with this issue? Any help is appreciated. Thanks in advance. Markus
Hi there, I got a problem with display sizes and resolutions. I own a lg optimus one with 320x480x180dpi This is what the activity looks on my device: 480px And on desire 480x800x260dpi: 800px I created other scrollviews and there it worked on bigger resolutions with no problem. Here the code in short (sample): Code: Dim br_scr1 As ScrollView Dim bra As ImageView br_scr1.Initialize(400dip) bra.Initialize("bra") Activity.LoadLayout("braillescreen") br_scr1.Panel.AddView(bra,5,5,40,60) bra.Bitmap = LoadBitmap(File.DirAssets,"br_a.png") bra.Gravity = Gravity.CENTER Can someone please help me with this issue? Any help is appreciated. Thanks in advance. Markus
klaus Expert Licensed User Longtime User Feb 24, 2011 #2 Your line Code: br_scr1.Panel.AddView(bra,5,5,40,60) should be Code: br_scr1.Panel.AddView(bra,5dip,5dip,40dip,60dip) In the first case the values are pixels. In the second case the values are density independant pixels and will be adjusted according to the resolution. Best regards. Upvote 0
Your line Code: br_scr1.Panel.AddView(bra,5,5,40,60) should be Code: br_scr1.Panel.AddView(bra,5dip,5dip,40dip,60dip) In the first case the values are pixels. In the second case the values are density independant pixels and will be adjusted according to the resolution. Best regards.
P Paladium Member Licensed User Longtime User Feb 24, 2011 #3 Hi Klaus, thanks for your quick help. I will try this later. I will post my results. Markus Upvote 0
P Paladium Member Licensed User Longtime User Feb 24, 2011 #4 That worked. THANK YOU!!!!!!!!!! :sign0060: Markus Upvote 0