14
14
import android .support .design .widget .CoordinatorLayout ;
15
15
import android .support .design .widget .FloatingActionButton ;
16
16
import android .support .design .widget .Snackbar ;
17
- import android .support .design .widget .TabLayout ;
18
17
import android .support .v4 .view .ViewPager ;
19
18
import android .support .v7 .app .AppCompatActivity ;
20
19
import android .support .v7 .graphics .Palette ;
25
24
import com .bumptech .glide .Glide ;
26
25
import com .github .florent37 .glidepalette .BitmapPalette ;
27
26
import com .github .florent37 .glidepalette .GlidePalette ;
27
+ import com .kekstudio .dachshundtablayout .DachshundTabLayout ;
28
28
29
29
import butterknife .BindView ;
30
30
import butterknife .ButterKnife ;
@@ -51,8 +51,8 @@ public class HomeActivity extends AppCompatActivity implements HomeContract.View
51
51
AppBarLayout mAppBarLayout ;
52
52
@ BindView (R .id .iv_home_banner )
53
53
ImageView mIvHomeBanner ;
54
- @ BindView (R .id .tl_home_category )
55
- TabLayout mTlHomeCategory ;
54
+ @ BindView (R .id .tab_home_category )
55
+ DachshundTabLayout mDachshundTabLayout ;
56
56
@ BindView (R .id .vp_home_category )
57
57
ViewPager mVpCategory ;
58
58
@ BindView (R .id .collapsing_toolbar )
@@ -104,8 +104,7 @@ private void initView() {
104
104
infoPagerAdapter .addFragment (resFragment );
105
105
106
106
mVpCategory .setAdapter (infoPagerAdapter );
107
- mTlHomeCategory .setupWithViewPager (mVpCategory );
108
- mTlHomeCategory .setTabGravity (TabLayout .GRAVITY_FILL );
107
+ mDachshundTabLayout .setupWithViewPager (mVpCategory );
109
108
mVpCategory .setCurrentItem (1 );
110
109
mVpCategory .setOffscreenPageLimit (6 );
111
110
}
0 commit comments