开发者

Tips for lightweight Android Applications

开发者 https://www.devze.com 2022-12-15 14:52 出处:网络
I am starting to develop Android applications and I would like to know if there are any tips for creating lightweight applications. This is my first attempt to write applications on a mobile platform

I am starting to develop Android applications and I would like to know if there are any tips for creating lightweight applications. This is my first attempt to write applications on a mobile platform but I 开发者_Python百科hope that my experience in programming will help.

I have in mind the "Better, Faster, Lighter Java" book, but will this be "the" answer to my question? Are there any tips specific for the Android Platform that will allow me to build lightweight applications?


A good place to start would be the Designing for Performance and Designing for Responsiveness documents in the Android Developer Documentation.


Realize that you are coding for a platform with limited memory, so try not to allocate memory unless you absolutely have to. The last thing you want is for the garbage collector to kick in and start eating CPU cycles. Also, quite often "performance" is synonymous with "user experience" so if you have to do anything CPU intensive, do it in the background and out of the UI thread.

Here is some additional information that you might find useful:

  • Turbo Charge Your UI
  • Coding for Battery Life
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号