简体   繁体   English

如何使用最新的android设计库实现水平滚动选项卡?

[英]how to implement horizontally scrolling tabs using latest design library of android?

I want to implement material design scrolling tabs using latest design library. 我想使用最新的设计库来实现材料设计滚动选项卡。

As android developer blog says that it can be implemented with design library. 正如android开发者博客所说,可以使用设计库来实现。

See Android Blog Tab section 请参阅“ Android博客标签”部分

It says " ...as well as scrollable tabs... " 它说:“ ...以及可滚动的标签...”

So how? 又怎样?

Here is what you need! 这就是您所需要的!

     private void setUpTabs() {
            TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
            tabLayout.setTabMode(TabLayout.MODE_SCROLLABLE);
        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在最新的Android Design支持库中将Tabs添加到TabLayout - How to add Tabs to the TabLayout in latest Android Design Support Library 如何实现水平滚动标签? - How to implement horizontally scrollable tabs? 如何使用 Android 中的任何库来实现以下设计 - How can I implement the below design using any library in Android 如何使用Android中的自动滚动选项卡设计单页面应用程序? - how to design Single page application with auto-scrolling tabs in Android? 如何将设计库实现到 android 应用程序? - How to implement design library to android app? 如何使标签随着活动水平滚动? - how make tabs scrolling horizontally with activities? Android如何设计标签 - Android how to design tabs 如何在Android中实现标签页 - How to implement tabs in Android Android设计支持库TabLayout使用自定义选项卡布局,但布局包装选项卡 - Android Design Support Library TabLayout using custom tabs layout but layout wrapping the tabs 使用ViewPager滑动时,TabHost选项卡不会水平滚动 - TabHost tabs are not horizontally scrolling when swiping using ViewPager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM