設定アクティビティのユーザがボタンで使用するさまざまなグラフィックから選択できるウィジェットを作成していますImageView(またはImageButton)と StateListDrawable)。ウィジェットが追加されると、選択したグラフィックがウィジェットレイアウトで使用されます。レイアウトは次のとおりです。設定アクティビティのユーザの選択に基づいて、ウィジェット内にImageList/ImageView.backgroundDrawableとしてStateListDrawableを設定する
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
<ImageView
android:id="@+id/button"
android:layout_width="72dip"
android:layout_height="72dip"
android:background="@null"
android:clickable="true">
</ImageView>
</LinearLayout>
私の質問ですが、私は、構成活性のユーザーの選択に基づいてウィジェットに示したのImageButtonで選択backgroundResourceを設定するのですか?