9-patch drawable に基づくリストのセレクターがありますが、android 2.+ および 4+ android ベースのデバイス (LG Optimus Sol E730、Nexus 4、HTC One V) では異なって見えます: android 2+ の結果
Android 4+ の結果
セレクターのコードは次のとおりです。
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/row_widget_selected" android:state_selected="true"/>
<item android:drawable="@drawable/row_widget_selected" android:state_pressed="true"/>
<item android:drawable="@drawable/row_widget_disabled" android:state_enabled="false"/>
<item android:drawable="@drawable/row_widget"/>
</selector>
セレクターの使用:
<com.ssbs.sw.SWE.widget.SpinnerWidget
android:id="@+id/dialog_outlet_task_edit_spinner_type"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?listWidgetSelector"
およびセレクター 9 パッチ ドローアブル
Q: Android 4 以降では同じセレクターが異なって見えることがわかりますが、これはグラデーションです。なぜそうなのですか?