Android Question Is 85%y + 15%y equal 100%y ?

somed3v3loper

Well-Known Member
Licensed User
Longtime User
Hi
I know it should be a weird question but when I add a view (Panel , I did not test other views) with its Top at 85%y and its height being 15%y , It seems there is a tiny space of activity left not covered with the panel.
I am using code like this
B4X:
Activity.AddView(pnl1,0,85%y,100%x,15%y)

Am I missing something or a better method of adding views to activity?

Thanks in advance
 

Informatix

Expert
Licensed User
Longtime User

15%y + 85%y is not exactly equal to 100%y because of the roundings but the difference should be no more than 1 pixel.
 
Upvote 0

somed3v3loper

Well-Known Member
Licensed User
Longtime User
It is the same

15%y + 85%y is not exactly equal to 100%y because of the roundings but the difference should be no more than 1 pixel.

Thanks guys for replying


Is it a good idea to add 1dip like this

B4X:
Activity.AddView(pnl1,0,85%y,100%x,15%y+1dip)


?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…