Android文本视图

【Android文本视图】幽映每白日,清辉照衣裳。这篇文章主要讲述Android文本视图相关的知识,希望能为你提供帮助。
To change your textview id
android:id=a€?@+id/TextViewa€?

To change your textview text
android:text=a€?This is my first textview sample applicationa€?

To enable or disable textview
android:enabled=a€?falsea€?

To change your textview width & height
android:layout_height=a€?wrap_contenta€?
android:layout_width=a€?fill_parenta€?

To change your textview background
android:background=a€?@drawable/icona€?

To change your textview text size
android:textSize=a€?16pxa€?

To change your textview text style
android:textStyle=a€?bolda€?

  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=" http://schemas.android.com/apk/res/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>


    推荐阅读