如何实现水平滚动选项卡? [英] How to implement horizontally scrollable tabs?

查看:48
本文介绍了如何实现水平滚动选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试实施此应用程序.目前我已经在上面设计了标签,因为我有超过 7 个标签,所以看起来太拥挤了.我如何设计它以便 tabwidget 可以水平滚动.我在市场上的少数应用程序上看到过这种设计,但不知道如何在我的应用程序中实现这一点.

I'm trying to implement this application. At the moment I have designed tabs on it and since I have more than 7 tabs it looks too congested. How can I design it so that the tabwidget is scrollable horizontally. I have seen this design on few of the apps at the market but no clue how to implement this in my app.

我看到的一个应用程序有一个水平滚动视图,它可以自行滚动,当您按下特定图像/按钮时,它会显示一些内容.我猜它似乎不是标签.

One app I saw had a horizontal scrollview where it scrolls on its own and when you press the particular image/button it displays some content. It didn't seem to be tabs I guess.

那么有人知道这个吗?

推荐答案

请查看 Jake Wharton 的 ViewPager 应用程序.这正是您所需要的.它是一个库项目,因此您必须将其包含在您的项目中.

Please check out Jake Wharton's ViewPager app. That is exactly what you need. It is a library project, so you have to include it in your project.

JakeWharton/Android-ViewPagerIndicator

这篇关于如何实现水平滚动选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆