アプリケーションのアクション バーに ImageButton があり、タイトルを選択してビューを変更するためのスピナーをシミュレートするために使用します (開始点として MonoDroid.ActionBar を使用しています - http://bit.ly/UBzI77 )。
ImageButton の XML は次のとおりです。
<ImageButton
android:id="@+id/title_spinner_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/actionbar_title"/>
XML に android:background 属性を追加して、ImageButton の背景を透明にすると。
<ImageButton
android:id="@+id/title_spinner_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/actionbar_title"
android:background="@null"/>
ImageButton の背景は消えますが、アイコンは垂直方向の中央に配置されます。
ImageButton の背景を透明にする方法を知っている人はいますか?
前もって感謝します。