Posted By

hmvrulz on 12/10/10


android textview

Versions (?)

Android text View

 / Published in: XML

To change your textview id android:id=”@+id/TextView”

To change your textview text android:text=”This is my first textview sample application”

To enable or disable textview android:enabled=”false”

To change your textview width & height android:layoutheight=”wrapcontent” android:layoutwidth=”fillparent”

To change your textview background android:background=”@drawable/icon”

To change your textview text size android:textSize=”16px”

To change your textview text style android:textStyle=”bold”

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout android:id="@+id/LinearLayout01"
  3. android:layout_width="fill_parent"
  4. android:layout_height="fill_parent"
  5. xmlns:android="">
  6. <TextView android:text="This is my first textview sample application"
  7. android:id="@+id/TextView"
  8. android:layout_height="wrap_content"
  9. android:layout_width="fill_parent"
  10. android:background="@drawable/icon"
  11. android:textSize="16px"
  12. android:textStyle="bold">
  13. </TextView>
  14. </LinearLayout>

Report this snippet  

You need to login to post a comment.