This is what my floating action button is showing爲什麼我的浮動操作按鈕不能正確顯示其圖像?
寧可只是顯示圖像的實際圓形部分,它會嘗試使我的.png文件的背景適合浮動動作按鈕。
這裏是我的XML代碼:
<android.support.design.widget.FloatingActionButton
android:id="@+id/addToKitchenButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:layout_gravity="bottom|end"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:src="@drawable/fab_icon"
/>
how do I get it to look like this?
我已經給我的PNG文件透明背景,所以我不知道還有什麼我需要做的。請幫忙。
謝謝。
謝謝,這正是我所需要的,但現在我有這個問題http://stackoverflow.com/questions/39737699/why-is-my-floating-action-button-not-displaying-properly-different-問題從m它不能正常顯示 –