简体   繁体   English

带有滑动标签的Android操作栏

[英]Android action bar with swipe tabs

In my application I have an action bar with swipe tabs like this: 在我的应用程序中,我有一个带有滑动标签的操作栏,如下所示:

我有类似的东西

When I swipe between views the blue stripe moves only after a new view takes the whole screen. 当我在视图之间滑动时,蓝色条纹仅在新视图占据整个屏幕后才会移动。

How can I make it move dynamically according to the users swipes? 如何根据用户滑动动态移动? (like in the Google Play, if the screen shows something between two views the stripe will be between the two tabs) (就像在Google Play中一样,如果屏幕显示两个视图之间的内容,则条带将位于两个标签之间)

在此输入图像描述

尝试使用此代码来实现您的目标

动态选项卡滑动碎片实现: 动态滑动选项卡

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM