Android Question Graphic Menu

mitsusdev

Member
Licensed User
Longtime User
What is the best way for do a graphic menu multi-resolution ?

I have done a test with buttons, but for some devices the single button are moved.

ok

screenshot.jpg


finger 3 is in bad position and the all menu is small and not center
(galaxy tab - 600x1024 1.5 - 250 dpi)
screenshot_bad.jpg
 

mitsusdev

Member
Licensed User
Longtime User
Sorry Erel

maybe, i don't understand

i'm capture the percentage of top, left, height and width for each button.

B4X:
   Perc(0)  = (Dito1.Top  * 100) / Activity.Height
   Perc(1)  = (Dito1.Left  * 100) / Activity.Width
   Perc(2)  = (Dito1.Width  * 100) / Activity.Width
   Perc(3)  = (Dito1.Height * 100) / Activity.Height

   and other buttons

B4X:
'Dito1
Perc=54.651161193847656
Perc=9.375
Perc=16.5625
Perc=8.60465145111084

and other buttons

after i use these percetanges for set top and left postision on each device
B4X:
   Dito1.Top  = (Activity.Height / 100) * 54.651161193847656
   Dito1.Left  = (Activity.Width  / 100) * 9.375
   Dito1.Width  = (Activity.Width  / 100) * 16.5625
   Dito1.Height = (Activity.Height / 100) * 8.60465145111084
but the result is this.
screenshot_bad2.jpg
 
Upvote 0

mitsusdev

Member
Licensed User
Longtime User
Thank you

i have resolve with set gravity to fill.
the dimensions were good, but the images were small.

i'm try your solution with percentace format, but the form of hand is bad.
some device have 1.5 of ratio, other device have 1.7 of ratio.
for a good form the ratio must be the same.
 
Upvote 0
Top