I got a string message taken from a php file. And in Android I've specified a generic string value shown below.
private static final String message = " ";
How do i get this string value to be shown in the textview in my Android app?
I got a string message taken from a php file. And in Android I've specified a generic string value shown below.
private static final String message = " ";
How do i get this string value to be shown in the textview in my Android app?
you can try this:
Textview mytxt=(Textview ) findViewById(R.id.textview1);
mytxt.settext(message );
Putting text to textView (you need to get a hold of reference to TextView):
textView.setText(message);
More references: Android - Set text to TextView
take text view reference from findviewbyid
textView.setText(message.trim());
it is very simple try the following code:
TextView yourtextview = (TextView) findViewById(R.id.yourtextview);
yourtextview.setText(message );