我有问题要自定义后退箭头。
这是我的主题:
<style name="Theme.MyTheme" parent="@style/Theme.Sherlock">
<item name="android:homeAsUpIndicator">@drawable/abs__ic_ab_back_white_my</item>
<item name="homeAsUpIndicator">@drawable/abs__ic_ab_back_white_my</item>
</style>
这是选择器 - abs__ic_ab_back_white_my:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/abs__ic_ab_back_white_default"
android:state_focused="true"
android:state_pressed="false"/>
<item
android:drawable="@drawable/abs__ic_ab_back_white_pressed"
android:state_focused="true"
android:state_pressed="true"/>
<item
android:drawable="@drawable/abs__ic_ab_back_white_pressed"
android:state_focused="false"
android:state_pressed="true"/>
<item android:drawable="@drawable/abs__ic_ab_back_white_default"/> </selector>
箭头上的选择器不起作用(它适用于ImageButton)。箭总是 - abs__ic_ab_back_white_default
答案 0 :(得分:1)
适用于Android版4.3的设备