Posts

Showing posts from May, 2013

Image and graphics tips for Android

Image
This article provides some practical tips to help you achieve the best visual quality on all devices for your Android app. The look of your app is important. For users, it's the first quality indicator they see. Attractive design, clear and effective layouts that feel optimal on the user's device, and high quality icons, graphics, and images, send clear quality messages. Visual quality also contributes to both the functionality and usability of your app. For example, legible fonts and font sizes, and colour palettes that enhance legibility, are functionally essential, not just nice-to-haves. The importance of consistency and scalability The biggest issue affecting how an Android app looks on a given device is scaling. Compared to some platforms (for example iOS and Blackberry), the variation in physical display characteristics between devices based on the same or compatible Android software versions, can be much greater. Android solves this problem by

Different layouts for different screen sizes in Android

Image
Android ( Version less than 3.2 or API Level less than 13 )  classifies the screen sizes into four different groups such as small, normal, large and extra large. The resolutions of small, normal, large and extra large are at least 426 x 320 , 470 x 320 ,  640 x 480 and 960 x 720 respectively where all the resolution values are measured in the unit “dp”. The layout file for the small screen devices are stored in the folder res/layout-small. Similarly layout folders for normal, large and extra large screens are stored in res/layout-normal, res/layout-large and res/layout-extra respectively. Beginning from Android version 3.2( API Level 13), there is no such thing as size grouping. That is size grouping is deprecated from Android version 3.2 onwards. From Android 3.2 onwards, the smallest width required for a layout file is specified. This is done by specifying directory name as “layout-sw<N>dp” where <N> is the smallest width of the screen in the unit dp. If

Android GridLayout

Image
GridLayout GridLayout was introduced with Android 4.0. This layout allows you to organize a view into a Grid. GridLayout separates its drawing area into: rows, columns, and cells. You can specify how many columns you want for define for each View in which row and column it should be placed and how many columns and rows it should use. If not specified GridLayout uses defaults, e.g. one column, one row and the position of a View depends on the order of the declaration of the Views . The following layout file defines a layout using GridLayout .

Common Android development problems and their solution

Image
1. Common Android development problems and their solution Things are not always working as they should during your Android development. This section gives an overview over typical problems and how to solve them. 1.1. Clean Project Several users report that they get the following errors: Project ... is missing required source folder: 'gen' The project could not be built until build path errors are resolved. Unable to open class file R.java.