Effective Android Programming Techniques
Posted
by kunjaan
on Stack Overflow
See other posts from Stack Overflow
or by kunjaan
Published on 2010-06-02T19:42:01Z
Indexed on
2010/06/07
1:22 UTC
Read the original article
Hit count: 371
Please Help me compile a list of Effective Android Programming techniques
Don't forget to free resources after use.
Lot of resources like Cursors are overlooked. Free them too.Don't Use magic Numbers.
values[0] is meaningless. The framework provides very useful accessors likevalues[SensorManager.DATA_X]
"Make use of onPause()/onResume to save or close what does not need to be opened the whole time."
protected void onResume() { mSensorManager.registerListener(...); } protected void onStop() { mSensorManager.unregisterListener(...); super.onStop(); }
Make your Android UI Fast and Efficient from the Google I/O has a lot of useful UI Performance tips.
© Stack Overflow or respective owner