现有一个图标
图标是一个白圈圈包裹一个垃圾桶。
如果用FloatingActioButton来做,
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/multitask_delete"
/>
</LinearLayout>
其效果是
怎么把外面一圈的红色圆环去掉,只剩下一个图标(白线圈包裹垃圾桶)呢?
尝试多种修改:
发现
android
:elevation=
"1dp"的值
android:layout_marginRight="6dp"的有无
app:pressedTranslationZ="6dp"的有无,的值
app:borderWidth="0dp"的有无,
android:scaleType="centerInside"
android:scaleType="fitCenter"
android:scaleType="centerCrop"的取值
android:layout_width="100dp"
android:layout_height="100dp"
还是
android:layout_width="wrap_content"
android:layout_height="wrap_content"
都不会对效果有什么改变。。
都不能让外面的大圈圈消失。
解决。。
用ImageView代替FloatingActionButton。