How to assign percentage variables to views programatically

boredsilly

Member
Licensed User
Longtime User
Hi,

Best to view my code first:

B4X:
   Dim lblPno1 As Label
   lblPno1.Initialize("")
   wkLeft=11%x
   wkWidth=62%x
   wkTop=(aTop+(i*(aHeight+1)))%y
   wkHeight=(aHeight)%y
   lblPno1.Text=Cursor.GetString("Pno")
   Activity.AddView(lblPno1,wkLeft,wkTop,wkWidth,wkHeight)

I'd like to add views with a certain %y value for top and height (the code is within a for loop), is there a way to do this?

Regards

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