Comments (7)
你绑定了吗? zhongzixing @.> 于2022年8月26日周五 16:45写道:
…
setCurrentItem(index, false)光标不移动,另外初始化Viewpager其他index。选中tab也无法准确选中 — Reply to this email directly, view it on GitHub <#290>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJNWTMJH32PRI2FUR7WGZLV3B73VANCNFSM57V42J4Q . You are receiving this because you are subscribed to this thread.Message ID: @.>
解决了,如果不需要滑动动画的话,则需要手动在onPageSelected之前进行onPageScrolled(position,0f,0)就可以了
from magicindicator.
viewPager.setCurrentItem(index,false);
magicIndicator.onPageScrolled(index,0,0);
from magicindicator.
from magicindicator.
绑定了依然会出现这问题,如果是setCurrentItem(index, true)光标则会正常移动,很头疼
from magicindicator.
你绑定了吗? zhongzixing @.> 于2022年8月26日周五 16:45写道:
…
setCurrentItem(index, false)光标不移动,另外初始化Viewpager其他index。选中tab也无法准确选中 — Reply to this email directly, view it on GitHub <#290>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJNWTMJH32PRI2FUR7WGZLV3B73VANCNFSM57V42J4Q . You are receiving this because you are subscribed to this thread.Message ID: @.>
使用的viewpager2,自己手动绑定的,依然会出现这问题,如果是setCurrentItem(index, true)光标则会正常移动,很头疼
from magicindicator.
绑定了依然会出现这问题,如果是setCurrentItem(index, true)光标则会正常移动,很头疼
一样遇到这问题啊,怎么解决,绑定viewpager点击tab切换fragment,setCurrentItem(index, false),就没有动画,
setCurrentItem(index, true)就正常有动画
@hackw @zhongzixing @prohack @zl277287818
from magicindicator.
发现demo 的 LoadCustomLayoutExampleActivity 类也是这样:
commonPagerTitleView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mViewPager.setCurrentItem(index, false); } });
.setCurrentItem(index, false); 点击底部菜单就没有动画了 @hackw
from magicindicator.
Related Issues (20)
- Failed to resolve: com.github.hackware1993:MagicIndicator:1.6.0
- 作者大佬能否增加个 indicator 的局部刷新的方法呀 HOT 1
- 关于小米11无限onLayout解决方案
- 垂直方向能否增加支持? 我尝试改了下,问题太多了, HOT 1
- 1.7.0 MagicIndicator 与viewpager2联用不能点击 HOT 7
- ViewPagerHelper.bind(magicIndicator, mViewPager); 不支持传ViewPager2 ? HOT 1
- 希望提供选中字体和未选中字体大小设置方法,不使用缩放方式 HOT 2
- 不支持talkback
- QQ群搜索不到 HOT 1
- 好家伙。人人都是产品经理是吧。issues应该给你们改成提需求区 HOT 1
- 能支持下 viewpage2? HOT 3
- 卧槽。大佬居然回来了 HOT 2
- work with ViewPager时 commonPagerTitleView.onPagerTitleChangeListener无效
- Title 不能识别换行符 \n 啊啊啊
- 怎么设置无限滑动呢 HOT 2
- 多加点其他动画效果吧 这些都过时了 可以看看爱奇艺其他社交 酷炫指示器动画
- 如何设置TitleView的背景色,直接设置后,指示器的颜色会被遮住
- 页面初次加载后,onSelected会触发多次的问题请问如何解决 HOT 2
- LinePagerIndicator not work when smoothScroll is false HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magicindicator.