Tips & Tricks: Happy new year!

Hi developers,

This week again no real tips and tricks from PullesSon – Android.

All we want to do with this post is wish you a happy new year and we hope you will begin the year close to your friends and family. We wish you all health, love and a lot of Android in 2012.

See you next year!

Kind regards,
PullesSon – Android.

Updated: Let Me Android That For You

Hi App-users,

We are proud to announce an update on Let Me Android That For You.

Now you can change the LMGTFY options from the menu. You can chance the the language of the result page of LMGTFY and also select some Google Apps, like Maps, Finance and Images.

Have fun with it.

Kind regards,
PullesSon – Android.

Tips & Tricks: Merry Christmas

Hi developers,

Today no real tips and tricks from us. All we want to do is to wish you all a merry Christmas, because we don’t want you to miss gathering with family and friends while you are reading our tips and tricks or developing.

Android Snowman

Happy holidays!

Kind regards,
PullesSon – Android

Tips & Tricks: Screen sizes

Hi Android developers,

Last week was hectic, we needed to reinstall and reconfigure the backend server of Perka’s File stash.

This week we will take a little twist and we will talk about a topic that is more focused on design: Screen sizes.

When designing Android apps the best practice is to use Density-independent pixel (dp) as measure. A dp is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a “medium” density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160).

Another best practice is to use wrap_content and fill_parent in XML so the layout will scale automagically. Also a RelativeLayout is a good practice, it will keep the distances the same even if the screen is bigger or smaller.

Also keep in mind of using layout and orientation qualifiers, which can be added to the /res/ directory. This will make it easy to make to make a different layout for another screen size and/or orientation.

For images used in for the different screens, you might want to use draw9patch to make image.9.png files. These files are processed by the tool and you can assign how it will be stretched.

Another good practice is to use Fragments, this will allow you to reuse designs in different layouts. You can combine the fragments in a layout or just use 1 fragment as layout.

Extended information can be found at: Supporting Multiple Screen Sizes and Android Training Multiscreen

Kind regards,
PullesSon – Android