- SnackBar,用法同Toast
- TextInputLayout
- 为EditText生成一个浮动的label
- 用法:将它作为EditText的父容器
- TabLayout
- TabLayout控件用于在应用中轻松地添加Tab分组功能,总共有两种类型可供选择:
- 固定Tabs:对应xml配置中的app:tabMode="fixed"
- 可滑动的Tabs:对应xml配置中app:tabMode="scrollable"
-
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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.support.v4.view.ViewPager android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/vp"></android.support.v4.view.ViewPager> <android.support.design.widget.TabLayout android:layout_width="match_parent" android:layout_height="wrap_content"> app:fixMode = "fixed" app:tabGravity="fill" </android.support.design.widget.TabLayout> </RelativeLayout>
tabLayout.setupWithViewPager(mViewPager)
- TabLayout控件用于在应用中轻松地添加Tab分组功能,总共有两种类型可供选择:
4. NavigationView