1. 程式人生 > >android-第一行代碼

android-第一行代碼

顯示 color 粗體 ati size 圖片 高度 背景 orien

android:orientation

horizontal/vertical

設置布局水平還是垂直,默認是垂直

android:layout_gravity

center/right/left/bottom/top

位置

android:gravity

center/right/left/bottom/top

android:textColor

#ffffff

字體顏色

android:textStyle

bold/italic/bolditalic

設置字形[bold(粗體) 0, italic(斜體) 1, bolditalic(又粗又斜) 2] 可以設置一個或多個,用“|”隔開

android:textSize

20dip

字體大小

android:layout_width 設置組件的寬度
android:layout_height 設置組件的高度
android:id 給組件定義一個id值,供後期使用
android:background 設置組件的背景顏色或背景圖片
android:text 設置組件的顯示文字
android:textColor 設置組件的顯示文字的顏色
android:layout_below 組件在參考組件的下面

android-第一行代碼