Tuesday, May 31, 2011

[android-developers] Re: XLIFF for changing text value in TextView

Ok I got it by myself, I do not need to use XLIFF just add these code
and everything is fine :)

textView = (TextView) findViewById(R.id.text_view);

then call this code to set the text

textView.setText("Your text here.");

On May 31, 11:11 am, JR <jayarr.patri...@gmail.com> wrote:
> Hello everyone,
> I am trying to change the text value in TextView using the src file
> (.java). By default I set the value to
> android:text="TEST" in main.xml file under TextView
> what I want is to change the value using the java so I can change the
> text value anytime I want. I look for resources and found the XLIFF in
> a sample xml file which I suspect I need to add in my code. It looks
> like this
> <string name="title_connected_to">connected to <xliff:g
> id="device_name">%1$s</xliff:g></string>
> I tried to understand the source codes of "BluetoothChat" sample to
> further understand the above code but I don't get it.
> If someone knows what I am talking about could you please help me?
> basically I only want to change the default text value in TextView
> that I set in the xml file through the src file (.java)
> Thanks a lot,
> JR

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
For more options, visit this group at

No comments:

Post a Comment