Fragmentation in Android can be broadly attributed to following 4 factors:
- Android OS Versions
- Devices with different densities (ppi)
- Devices with different form factors / screen sizes
- Customization done by OEM (Original Equipment Manufacturer)
Developing applications is a team work and there are key roles that help in containing fragmentation while developing apps. These are:
- UI Designer
- QA / Tester
We are covering the role of UI Designer here.
From UI Designer perspective, Fragmentation contributing factors #2 (Density) and #3 (Form Factor / Screen size) are more relevant and important.
Strategy / Approach for UI Designer to follow:
1. Following table shows the % of devices for different combination of density and screen size:
- Target highlighted cells to begin with. We can lower the priority for small screen sizes and low density devices.
2. Following table indicates representative screen sizes for highlighted cells:
Following table provides the ratios that apply to handle screen densities:
- Create layout and images for sizes as per highlighted cells above.
- Start with Normal-Extra High Density
- Follow the ratio and create images for Normal-High and Normal-Medium combination
- Images for Normal-High can apply to Large-Medium
- Create Images for Large-High combination
- Images for Large-High can apply to Extra Large-Medium combination
- Place images in their respective drawable folders and hand it over to developers.
Keep a watch on how the % of devices are changing. Tweak the strategy accordingly