Android Design Support Library全解:Part 1 Floating Action Button 悬浮按钮
Android Design Support Library系列第一弹,悬浮按钮 悬浮按钮(Floating action button ,FAB) 简单来说是一种圆形按钮,其悬浮于UI之上,四周有阴影环绕,可以用于实现一些高级操作,比如添加新的条目,或是为邮件添加附件等等。 FAB1 FAB2 就本质而言,FAB其实就是继承于ImageView的控件,其支持所有ImageView和ImageButton的属性。 FAB继承自ImageView 要使用FAB,首先要添加依赖包: //本文撰写时,最新版本是25.3.1 compile 'com.android.support:design:25.3.1' 第一步: 在layout文件中加入FAB,我们假设已经声明了命名空间xmlns:app=”http://schemas.android.com/apk/res-auto。 <FrameLayout android:id="@+id/layoutInner" android:layout_width="match_parent" android:layout_height="mat...