3
画像をFloatingActionButton
の背景として使用したいと思います。FloatingActionButtonで画像を使用できますか?
デフォルトの背景色はcolorAccent
であり、簡単に変更できます。しかし、その背景としてのイメージはどうですか?
どうすればいいですか?
説明を続ける。
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_add_black"
app:borderWidth="0dp"
app:fabSize="mini" />
とjavaファイルにあなたは、このように設定することができます:
はいできます。これは既に以前に尋ねられており、答えは[ここ]です(http://stackoverflow.com/questions/32036656/setting-src-and-background-for-floatingactionbutton) –