|
|
|
|
|
by peteforde
5007 days ago
|
|
I've been putting off porting an iOS app to Android specifically because of my fear of testing on so many devices. While I'm sad that there are 43 (and counting) possible variations, this looks solid and helpful — I'm much more likely to attempt my port project now. |
|
Always use dp instead of px, use dynamic layouts (like HTML/CSS) instead of absolute ones (like in iOS), use 9-patch or XML drawables wherever you can, don't fight the framework. Use the compatibility library for fragment support and other cool stuff, and use them wherever you can. Be careful about bitmap memory consumption, that's a gotcha on low-memory devices.
If you don't mess around with low-level stuff like NDK or OpenGL you should be good to go on the very most devices. The well-tread Java API paths are not as scary as some blogs want to make you believe. You don't have to own all the 10k devices which exist, because most of them have stock Android installed. For special cases you will receive stacktraces from people's devices in the Play dev console - or you use one of those crashlog services.