Make apps work on different size Androids

AntonBrz

Member
Licensed User
Longtime User
I need some help getting panels to fill the screen. In the past week to test apps I've ordered a 7 inch tablet and a small phone size Android. I'm a Newbie but I'm learning fast, mostly by studying the tutorials and forum. I've gone from not being able to do anything three days ago when I bought B4A, to playing music and showing panels and buttons, which I install and run on a real tablet. Problem, I can't get splash-screens and layouts to work on various sizes. If they look good on the emulator, things are ridiculously sized for my large tablet, which is the one I'm working with now. I've seen game apps which display correctly on my various size Ipads, and the Android versions display correctly on my 10, but I don't see those games sold for different size Androids. How do I make one size app fits all?
How large should splash-screens (titles, full page panels) be for different sizes?
Where is the best tutorial for sizing?
:BangHead:
 

wheretheidivides

Active Member
Licensed User
Longtime User
Use dips for x and y coordinates with percentages

In the designer layout you can select different size layouts for land and portrait modes and different size devices

In layout designer you can use autoscale to scale to different sizes.

You can look these up in the forem.
 
Upvote 0

bsnqt

Active Member
Licensed User
Longtime User
I need some help getting panels to fill the screen. In the past week to test apps I've ordered a 7 inch tablet and a small phone size Android. I'm a Newbie but I'm learning fast, mostly by studying the tutorials and forum. I've gone from not being able to do anything three days ago when I bought B4A, to playing music and showing panels and buttons, which I install and run on a real tablet. Problem, I can't get splash-screens and layouts to work on various sizes. If they look good on the emulator, things are ridiculously sized for my large tablet, which is the one I'm working with now. I've seen game apps which display correctly on my various size Ipads, and the Android versions display correctly on my 10, but I don't see those games sold for different size Androids. How do I make one size app fits all?
How large should splash-screens (titles, full page panels) be for different sizes?
Where is the best tutorial for sizing?
:BangHead:

The best resource, I believe, for starting with this and see how it works is the Beginner's Tutorial (pdf file). Look at this reference, it is a perfect guide. It is written even with some source codes (sample project).
 
Upvote 0

AntonBrz

Member
Licensed User
Longtime User
The auto sizer in the Layers source code example

Thank you. I discovered a lot in the LAYERS source code example included with B4A.
The one with a horse running across a moving field. It has sizing set up for different sized Androids. Assuming I use this basic form (perhaps without the movement of the background or the sprite left to right) What happens if I put a button on the screen? Does it sit on top of the horse (Foreground layer). If I could use buttons created in Designer, I could have an animated sprite showing the page. I'm just afraid I wouldn't be able to click the button if the foreground layer was over it, or does that only count for the rect. where the animated image is?
 
Upvote 0

madSac

Active Member
Licensed User
Longtime User
Both panels and buttons are different objects so adding button won't effect it. And you can use properties like bring to front during design time to acquire what you want.
 
Upvote 0
Top