【发布时间】:2015-05-17 01:55:16
【问题描述】:
如何将撰写按钮添加到我的应用程序?它是许多 Google Apps 右下角的按钮,例如 Inbox。
我在哪里可以找到这个按钮?
【问题讨论】:
标签: android
如何将撰写按钮添加到我的应用程序?它是许多 Google Apps 右下角的按钮,例如 Inbox。
我在哪里可以找到这个按钮?
【问题讨论】:
标签: android
使用相对布局
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<View
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="120dp"
/>
<View
android:id="@+id/body"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/header"
/>
<whatever.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignBottom="@id/body"
android:layout_marginBottom="-32dp"
android:layout_marginRight="20dp"
/>
</RelativeLayout>
【讨论】: