我正在使用视图寻呼机。我遇到了将fab与屏幕bottom|end
对齐的问题。
我的观点代码是:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="40sp"
android:textStyle="bold"
tools:text="Words" />
<android.support.design.widget.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:backgroundTint="@color/colorPrimary" />
</RelativeLayout>
并产生以下输出
它被裁掉了。 我认为它可能会渲染片段的屏幕大小并忽略我从中调用它的活动的实际视图。
有人对如何解决此问题有任何想法?