100%x and 100%y value inconsistency

dreamworld

Active Member
Licensed User
Longtime User
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region

With such settings, Activity.top is 0 and Activity.height is the height of the screen. I have tested that.

I think that Activity.top should be equal to the height of the status bar at the top and Activity.height should be equal to "100%y - status bar height".

I am designing an activity by code, not by designer scripts.

I put a label (Label1) at the top
left=0
top =0
width=100%x
height=30
and I put a listview at the bottom
left=0
top=Label1.height
width=100%x
height=100%y-Label1.height

When I tested the activity, the last listview item can't show entirely, because the listview bled off the screen.

Now, it is a headache for me to decide the height of the listview according the screen height of device.

Is there a way to get the height of the status bar?
 

dreamworld

Active Member
Licensed User
Longtime User
My discovery is:
When the main activity is full screen and the sencond activity (not fullscreen) is started, the value of 100%y is not updated and remians the height of the screen. When the third activity is started by clickin on a button on the second activity, the value of 100%y is updated and is equal to screen height substract height of status bar.

This is a bug!
 

Informatix

Expert
Licensed User
Longtime User
My discovery is:
When the main activity is full screen and the sencond activity (not fullscreen) is started, the value of 100%y is not updated and remians the height of the screen. When the third activity is started by clickin on a button on the second activity, the value of 100%y is updated and is equal to screen height substract height of status bar.

This is a bug!

I have the same issue with two activities with a different Full Screen setting.
 

alwaysbusy

Expert
Licensed User
Longtime User
I have a similar problem in an app of mine that may be related to this problem.

1. When the app starts 100%x = 600 and 100%y = 951 (which is ok).
2. Then the device goes to sleep mode. When it wakes, this device has an unlock screen, which is fullscreen.
3. before unlocking, I turn the screen to landscape
4. I turn it back to portrait
5. I unlock. After it is unlocked and shows my app again, the values of 100%x = 600 and 100%y = 999 (Which are the fullscreen values 951 + 48 for the bar).

They stay those values and are never updated back to 600 and 951 unless the app is closed.

Because of the orientation switch, the code of activity_create has been called again, if this may be of any help.

B4A 2.70
Galaxy Tab 2 7 Inch
Android 4.1.1
 

Sortec

Member
Licensed User
Longtime User
I don't mean to grumble, but the title of this thread isn't very descriptive.

Something more descriptive would be, "100%x and 100%y value inconsistency."

Can the thread be renamed?
 
Top