[android-developers] Re: Is there any method to get one view by name

2009-10-11 Thread Larry.Liu

Thanks :)

That's definitely what I need.


Regards

Larry/Xiangqian.liu





On Sun, Oct 11, 2009 at 8:10 PM, Mark Murphy mmur...@commonsware.com wrote:

 Larry.Liu wrote:
 Is there any method to get one view by name rather than it's ID?
 because we are composing a common lib, and it's not able for us to
 know the Resource ID at this time,

 So is there any method to get one view by name, not by findViewById?

 getResources().getIdentifier() can get you the R.id.* value by name,
 which you can then use in findViewById(). Reports indicate that
 getIdentifier() is not terribly fast, so you may wish to cache the
 results of the lookup somewhere if possible.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://twitter.com/commonsguy

 Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

 


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is there any method to get one view by name

2009-10-10 Thread Larry.Liu

Hi,

Is there any method to get one view by name rather than it's ID?
because we are composing a common lib, and it's not able for us to
know the Resource ID at this time,

So is there any method to get one view by name, not by findViewById?

Thanks.

Regards

Larry/Xiangqian.liu

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is it necessary to introduce an Object Pool for our application

2009-09-24 Thread Larry.Liu

Hi,

General speaking, is it necessary to introduce an Object Pool for
common sense android applications?

It would be better of course, but will there be any chance for common
use applications to become unstable or cause memory leakage because of
too many object creation?

Let's have a discussion about this topic.

Thanks.

Regards

Larry/Xiangqian.liu

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---