MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

Developing Android Apps for Different Device Sizes and Resolutions

Published on 22 January 15
0
0
Developing Android Apps for Different Device Sizes and Resolutions - Image 1

Android runs on diverse devices that offer different screen sizes and resolutions along with densities. A consistent development environment across devices helps developers to adjust the app user interface to a variety of screen sizes and attributes.


The Android development environment is consistent in its approach for setting up apps for its smartphones and tablets. Android provides APIs that allow developers to control your application's UI for diverse screen sizes and resolutions to optimize the UI design for a variety of screen configurations.


Screen Size


Although the Android operating system helps in scaling and resizing the app to meet the dimensions and pixel densities, it needs to be optimized for different screen sizes and densities. One can maximize the user experience if they are convinced that the app is specifically designed for their devices, including their tablets and smartphones.


The app designer and developer need to keep in consideration the resolution of the app that implies the number of pixels on the device screen. The density needs to be considered too, which means pixels in a specific area need to be calculated in dpi format. Landscape and Portrait are two of the only orientations in practice for smartphones and tablets.


One needs to consider how to place an object into the screen with a catchy layout and relevant images. The layout depends on the setup and then on the overall image resolution.


To support different screen sizes, the developer needs to map the names in a directory structure and keep it within the res directory. The names are mapped in a particular structure, which is the normal layout. Each directory will contain the same elements with the same names, with the content different from each of them.


Incorporating the code, land will take care of the landscape orientation. The placement of the components facilitates the dynamic orientation setup: portrait and landscape.


Screen Density


Different Android devices have different densities too. Density affects the images and hence they need to be of the right size and need to dynamically change to adjust to the density ratio of the device. A directory under the directory res will help map these names. The code drawable is incorporated for adjusting screen density dynamically. It is the default directory that is used to avoid mapping every density.


Best Practice


Avoid using fixed dimension in components, and use dp instead of px for flexibility. Dp is a density independent pixel and helps in specifying dimensions in a virtual manner, whereas px would specify regular pixels for the app being developed. The virtual dimension is mapped to the real one with the help of real screen density.


Android is the best platform for developers & it also supports for developing Android Apps for Different Device Sizes and Resolutions.

This blog is listed under Development & Implementations and Mobility Community

Related Posts:
Post a Comment

Please notify me the replies via email.

Important:
  • We hope the conversations that take place on MyTechLogy.com will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
You may also be interested in
 
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top