Android Question why app pictures size was changed in bigger screen size?

zani

Member
Licensed User
Longtime User
hi guys i do not know why my app pictures size was changed in bigger screen size .
I have entered all sizes with percent but again sizes was changed pleaseeeeeeeeeeeeeeeeeeee
helppppppppppp me





 

zani

Member
Licensed User
Longtime User
B4X:
Dim top As Int =0


For i=1 To 21
p.Initialize("p")  
ScrollView1.Panel.AddView(p,5%x,top,90%x,100%y)
p.LoadLayout("shoppanel")



sp.Tag=i
splb1.Text=(i*100) & "  " & "سکه"
sppricelb.Text=(i*1000) & "  " & "تومان"
top=top+60dip

ScrollView1.Panel.Height=top+30dip
Next
it is my code it is very simple but not good in any size
 
Upvote 0

Daniel-White

Active Member
Licensed User
Longtime User
I am not sure in your case, but why mix % and dpi, in your code you use %, and this too
top=top+60dip ??? If I am not wrong, some screens are more dense in dip, it will be good change 60dip by % value, or put all in dip.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
What't the height of the panel in the "shoppanel" layout?
As you have AutoScaleAll active, the real height can be different from the height you set in the Designer.
You could get the height of the panel in the layout and use this to increment the top variable.
top = top + MyPanel.Height.
Or send a small project which shows the problem.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…