Monday, May 28, 2012

Re: [android-developers] Re: Difference btwn following methods

So object for textview is created in both methods.
What I thought is object will be created for first method only.
Thanks for the clarification Imran Ali

Regards,
Jovish



On Mon, May 28, 2012 at 11:33 AM, imran ali <imran2k1@gmail.com> wrote:
Nop, there is no difference,
Both are same it is simple java concept.

- in first way you are giving name of object of TextView and second way you are making anonymous object.
otherwise every thing is same.


Regards
Imran ali


On Monday, May 28, 2012 11:15:27 AM UTC+5:30, Jovish P wrote:
I just want to know any difference is there in the following methods
like memory allocation , performance issues


TextView txtView = (TextView)findViewById(R.id. username);
txtView.setText("Method 1");

((TextView) findViewById(R.id.priority_rel_layout)).setText(priorityList[i]);

Regards,
Jovish

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate