Design Support Library

  1. SnackBar,用法同Toast
  2. TextInputLayout
    • 为EditText生成一个浮动的label
    • 用法:将它作为EditText的父容器
  3. 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)
        

  4. NavigationView

  •   

猜你喜欢

转载自www.cnblogs.com/endian11/p/10436851.html