使用.9圖片最好 <TextView android:id="@+id/tv_play_free" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="left|top" android:layout_marginLeft="130dp" android:layout_marginTop="40dp" android:background="@drawable/freeze_bg" android:textColor="@color/white" android:textSize="45sp" android:text="@string/channel_free" android:visibility="gone" /> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/image" android:state_pressed="true" /> <item android:drawable="@drawable/image" android:state_selected="true" /> <item android:drawable="@drawable/image" android:state_focused="true" /> <item android:drawable="@drawable/image" android:state_selected="false" /> <item android:drawable="@drawable/image" android:state_focused="false" /> </selector>
TextView 設置background
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.