2016-08-28 3 views

答えて

0
<Switch 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:thumb="@drawable/switch_thumb" 
    android:track="@drawable/switch_bg" /> 

セレクタ

<selector xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item android:state_enabled="false" android:drawable="@drawable/switch_thumb_disabled_holo_light" /> 
    <item android:state_pressed="true" android:drawable="@drawable/switch_thumb_pressed_holo_light" /> 
    <item android:state_checked="true" android:drawable="@drawable/switch_thumb_activated_holo_light" /> 
    <item        android:drawable="@drawable/switch_thumb_holo_light" /> 
</selector> 

失活バージョン(Androidが使用さxhdpiバージョン)失活バージョンenter image description here

押圧スライダ:押さスライダーenter image description here

活性化されたスライダー(オン状態):アクティブスライダenter image description here

デフォルトのバージョン(オフ状態):ここに画像の説明を入力しenter image description here

図書館:SwitchButton

関連する問題