Hi all,

Not sure whether this is the correct place is discuss it but am sure
that it will be helpful to one and to all. What I am looking for is
better coding with parameters such as memory management, faster
processing and cleaner coding. Is there any set of Good Coding Guide
for Android from the framework Developers itself? For example;

Which of the following convention is better among them:

TextView tv = (TextView) findViewById(R.id.sampleTextView);
tv.setText("Hello World");

-- OR --

((TextView)  findViewById(R.id.sampleTextView)).setText("Hello
World");

Which will result in lesser memory usage and help in quicker garbage
collection. I have seen both type of coding in Android Framework (in
Gingerbread as well as Froyo).

I have been developing for more than a year on Android now and I think
anyone can code but to code clean and proper is what makes the
difference. Can someone suggest or help out from their experience and
knowledge.

Soumya

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to