How do you solve compatability issues?

1. Use dp (density independent pixels) in place of px for view width and height.

2. Create verious density image with same name for drawable- mdpi, hdpi, xhdpi, xxhdpi.

3. Use nine-patch images for better scaling without blur effect.

4. Avoid hard coded width and height values, and always give width and height with respect to parent.

5. Use fragments if you are targeting your application for both mobiles and tablets.

No comments:

Post a Comment