Android Studio: simpleTextView

From OnnoWiki
Revision as of 06:09, 11 April 2022 by Onnowpurbo (talk | contribs) (Created page with " TextView code in XML: <TextView android:id="@+id/simpleTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="AbhiAndroid" />...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

TextView code in XML:

<TextView android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AbhiAndroid" />

TextView code in JAVA:

TextView textView = (TextView) findViewById(R.id.textView);
textView.setText("AbhiAndroid"); //set text for text view