Running an app on Android 2.1, 2.2 & 2.3

johnaaronrose

Active Member
Licensed User
Longtime User
I'd like to run an app on any of Android 2.1, 2.2 & 2.3 phones. I've read the material in the beginner's guide and looked at a number of threads. My phone is a ZTE Blade which is specced as 480 x 800 pixels, 3.5 inches (~267 ppi pixel density). I created a Layout Variant with 480x800 scale=1.5 (240 dpi) which corresponds (I hope) to the ZTE Blade. BTW I've set the Orientations Supported to be only Portrait.

I compile & run the app on the emulator and it looks good on the emulator. I connect to the phone using b4a-bridge and compile & run the app. The phone requests me to install the app which I do followed by opening it. It looks good on the phone's screen.

My question is what do I have to do in order to make this app run on any of Android 21,2.2,2.3?

PS I presume that this is required in order to put the app on Android Market Place so that it can be used by almost any phone.
 

johnaaronrose

Active Member
Licensed User
Longtime User
I've put my question incorrectly. I meant to ask if the app would run on any Android phone (using Android 2.1,2.2 or 2.3) so that it would display on that phone's screen in a similar way to my ZTE Blade i.e. how to make it occupy the available space in the same way: for example, I've centralized the labels & buttons (one per line) i.e. there is the same number of pixels to their left as to their right.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are several possible approaches.
I recommend you to create three variants based on the default variants (portrait only):
SS-2012-02-24_08.53.16.png


If you want to be more accurate then you will need to add some code to make the fine adjustments.

Note that the next version will make this process simpler with a new feature named "designer scripts".
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
As I said, I'm only interested in phones using Portrait orientation. So what would the 3 variants be (e.g. in terms of pixels)?

When do you expect the next version of B4a to be released?
 
Upvote 0
Top