Android APP開發活用範例速查大辭典(Ch0103-利用XML來改變TextView字型顏色) – jashliao部落格
2021/12/25
Android APP開發活用範例速查大辭典(Ch0103-利用XML來改變TextView字型顏色)
value下的顏色定應XML(color.xml)
#1abc9c #16a085 #2ecc71 #27ae60 #3498db #2980b9 #9b59b6 #8e44ad #34495e #2c3e50 #f1c40f #f39c12 #e67e22 #d35400 #e74c3c #c0392b #ecf0f1 #bdc3c7 #95a5a6 #7f8c8d #ec6877 #68acec
|
value下的padding尺寸的XML(dimen.xml)
2dp 4dp 8dp 10dp 16dp
1000dp
|
程式GUI-XML
android:layout_width=”match_parent” android:layout_height=”match_parent” android:gravity=”center” android:orientation=”vertical” >
style=”@style/TextBigMan” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_margin=”@dimen/padding_minimum” android:background=”@color/FlatLightBlue” android:padding=”@dimen/padding_large” android:text=”黃色粗體字型” />
style=”@style/TextShadow” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_margin=”@dimen/padding_minimum” android:background=”@color/FlatLightBlue” android:padding=”@dimen/padding_large” android:text=”有陰影字型” />
|
熱門推薦
精彩推薦