number of "screens"

boten

Active Member
Licensed User
Longtime User
Any way to know how many "home screens" are on the phone? and possibly when the number changes? (user trash/add a home screen)
 

boten

Active Member
Licensed User
Longtime User
yes. but I wish the number of screen would be something that the Phone library "knows" , so the "user" can obtain this from the Phone object.
 
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Here is an answer: java - Get number of Home screens in Android? - Stack Overflow
Needs some more research.

Maybe this can help you (quoted from Erel's livewallpaper tutorial):
Offsets
On most devices the wallpaper virtual size is wider than a single screen. When the user moves to a different screen the offset changes.
You can use the OffsetChanged event to handle those changes.
LWEngine.FullWallpaperWidth / Height return the full size of the wallpaper.
LWEngine.CurrentOffsetX / Y return the current position.
Note that the wallpaper scrolls less than the foreground layer with the icons.
 
Last edited:
Upvote 0

thedesolatesoul

Expert
Licensed User
Longtime User
Well xOffsetStep and yOffsetStep are not exposed in B4A.
But I dont see how that will help you with much. Will you update the screen only on a page change? It does make sense.
Erel will probably have to modifiy his library to expose these.
You could also check for CurrentOffset - LastOffset > ScreenSize or something like that, I am not sure.
 
Upvote 0
Top