On Fri, May 25, 2012 at 1:02 AM, Arithy <mvari...@gmail.com> wrote:
> I've been working on android coding recently and I'm stuck up at this
> situation.
>
> Here is the code that sets up the View and prints the string that is
> present in the View.
>
> content.addView (record.getView (this,inflator,content,i), i+1) ;
> content.addView(inflater.inflate (R.layout.tag_divider, content,
> false), 2+1) ;
>
> I know that record.getView(this, inflator, content, i); returns the
> required View.  Actually, I want the data as a string because I want
> to work on it further. Its not jsut to print it on screen but to use
> it further like chek it with some other string, append it, etc. How
> could I get the string that is present in this View...? Can anyone
> guide me on that?

Views don't have strings. Or, more accurately, all views don't have
strings. If the view is a TextView, call getText(). If the view is
something else (e.g., ImageView), there is no string to extract.

Besides, since you were the one who put the string in the View in the
first place, you should be able to get at the string by other means.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

-- 
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

Reply via email to