Android Question Fill screen

Awesome Student 123

Member
Licensed User
Hello i been working on designer script for a while and i am having trouble to fill the screen with an image

B4X:
homep.Bottom = 50%y
homep.Top = 50%x

homep is the image view
 

klaus

Expert
Licensed User
Longtime User
What exactly do you want to do?
Your title says Fill screen.
But you try to set the Bottom property of the view to 50%y, why?
Then you set the Top property of the view to 50%x, why?
If you want to fill the screen you should set the two anchors, horizontal and vertical, to BOTH.
Then if you don't want to fill the whole screen you may set:
SetHorizontal(Left, Right) and SetVertical(Top, Bottom)
And why, for vertical coordinates using for Bottom 50%y and for Top 50%x a horizontal value !?
In this case in landscape orientation Top (50%x) will be bigger Bottom (50%y) !
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…