我想减少FAB
利润pre-Lollipop设备,但无论我做什么 - 没有任何变化。我创建了两个FAB
,其中一个在right|end|bottom
之内,其他都是以前的。那16dp
页边距使得两个FAB
之间的距离为32dp
,这对我来说太大了。如果使用bottop_padding
向下按钮的可点击区域与第二个按钮重叠。也许,有人有同样的问题?请帮帮我!Android支持设计浮动按钮
here is picture of how it looks like
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.FloatingActionButton
android:id="@+id/first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/directions"
app:backgroundTint="@android:color/holo_blue_light"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
android:layout_above="@+id/uer_position"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/second"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/my_location"
app:backgroundTint="@android:color/white"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
你能发布你的xml文件吗? –
@MarianoZorrilla,完成 – Near1999
*这16dp的利润*哪?他们在哪里定义? –