Abstract Designer

Stulish

Active Member
Licensed User
Longtime User
Hi all,

I have an app that looks nice on most screens but on my wifes Wildfire S (very small screen), it looks a little cramped. I have used the abstract designer to size the views and it seems to work well. I recently changed the designer script code to look to see if the screen is small:

B4X:
If 100%x>=800 OR 100%y>=800 Then 
   imgIcon.Left = 10
   imgIcon.Top = 0
   imgIcon.Height =80
   imgIcon.width =80
   appLbl.Left = 90
   appLbl.Top =0
   appLbl.Height = 80
   extra=90
Else
   imgIcon.Left = 10
   imgIcon.Top = -80
   imgIcon.Height =80
   imgIcon.width =80
   appLbl.Left = 90
   appLbl.Top =-80
   appLbl.Height = 80
   extra=0
End If

basically is the screens width or height are 800 or more then all views should be on screen, if it is smaller then the title and app image should be moved off the screen (a negative value). The reason i moved them off is because all of the other views take their top position from the views above .

If i run the script in the abstract designer it all works well and the views place themselves correctly. buth when i run the app on to a phone i get the following error:

Parsing code. 0.05
Compiling code. 0.47

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. 0.02
Generating R file. 0.12
Compiling generated Java code. Error
javac 1.7.0_02
src\lishsoft\android\saynoto0870\designerscripts\LS_main.java:14: error: illegal start of expression
if (((100d / 100 * width)>= || "800" || || (100d)>= || BA.ObjectToBoolean("800"))) {
^
1 error

It is obviously due to the way B4A converts to Java, my question is - is there a way to do this in abstract designer or am i trying to reach too far??

and thus i should put it into the code

Thanks

Stu
 
Top