<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          MDTabMaterial Design風(fēng)格的Tabbar

          聯(lián)合創(chuàng)作 · 2023-09-24 08:45

          MDTab

          一個(gè)仿google photos和google G+的Material Design風(fēng)格的Tabbar

          如何使用

          as引入:compile 'org.loader:mdtab:1.0.1'

          在xml中使用

          <org.loader.mdtab.MDTab
              android:id="@+id/tab"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_gravity="bottom"
              android:textSize="12sp"
              app:checked_color="#FF0000FF"
              app:checked_percent="130%"
              app:normal_color="@android:color/black"
              app:ripple_color="#22448aca"
              android:background="@android:color/white"
              app:tab_padding="5dp" />

          效果如下:

          如何配合CoordinatorLayout使用

          添加一條配置項(xiàng)目app:layout_behavior="@string/tab_behavior"就可以, 代碼如下:

          <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:orientation="horizontal">
          
              <android.support.v4.widget.NestedScrollView
                  android:layout_width="match_parent"
                  android:layout_height="match_parent">
                  <LinearLayout
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="vertical">
                      <TextView
                          android:layout_width="wrap_content"
                          android:layout_height="wrap_content"
                          android:padding="50dp"
                          android:text="loader" />
                      <!-- 像這樣的TextView還有不少個(gè)-->
                  </LinearLayout>
              </android.support.v4.widget.NestedScrollView>
          
              <org.loader.mdtab.MDTab
                  android:id="@+id/tab"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_gravity="bottom"
                  android:textSize="12sp"
                  app:checked_color="#FF0000FF"
                  app:checked_percent="130%"
                  app:layout_behavior="@string/tab_behavior"
                  app:normal_color="@android:color/black"
                  app:ripple_color="#22448aca"
                  android:background="@android:color/white"
                  app:tab_padding="5dp" /></android.support.design.widget.CoordinatorLayout>

          效果如下:

          和ViewPager一塊使用

          調(diào)用方法

          tab.setupWithViewPager(mViewPager);

          實(shí)現(xiàn)效果:

          瀏覽 26
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  看免费的一级黄色毛片 | 美女精品视频 | 中文字幕北条麻妃 | 做爱片一黄级 | 欧美在线观看不卡 |