我想減少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的利潤*哪?他們在哪裏定義? –