我有一个CoordinatroLayoutwith FloatingActionButton.这是我的代码:
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/toolbar_layout" android:layout_above="@+id/actionbar"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="120dp" android:minHeight="?android:attr/actionBarSize" android:background="@color/toolbar_color" /> <ScrollView android:layout_width="match_parent" android:layout_height="wrap_content" > </ScrollView> </LinearLayout> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" android:clickable="true" app:fabSize="mini" android:src="@mipmap/ic_action_edit" app:layout_anchor="@id/toolbar" app:layout_anchorGravity="bottom|right|end" app:backgroundTint="@color/toolbar_color" /> </android.support.design.widget.CoordinatorLayout>
但它在棒棒糖和棒棒糖前装置中看起来有所不同.
棒糖:
其实我没有添加任何保证金.但FAB在棒棒糖前设备上有优势.
我在cheessesquare样本中也看到了这个问题.它也显示出不同的边距.问题是什么?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。