ViewPagerIndicator使用流程记录
来源:互联网 发布:人工智能的好处英文 编辑:程序博客网 时间:2024/05/21 19:33
ViewPagerIndicator使用流程:
1.引入库文件;
2.在需要用到ViewPagerIndicator的布局文件中增加
<com.viewpagerindicator.TabPageIndicator 控件;
3.在Pager中拿到2中的控件mIndicator;
4.mIndicator.setViewPager()将ViewPager和指示器绑定在一起 必须在ViewPager设置完数据之后再绑定;
5.在PagerAdapter 中重写 public CharSequence getPageTitle(int position) {} 重新设置Tab标题;
6.根据需要,修改ViewPagerIndicator源码中的相关颜色;
在TabPageIndicator 源码中重写
<span style="font-size:24px;">@Override //事件分发流程!!!public boolean dispatchTouchEvent(MotionEvent ev) {//请求所有父控件不要拦截事件getParent().requestDisallowInterceptTouchEvent(true);return super.dispatchTouchEvent(ev);}</span>
8.当Viewpager和ViewPagerIndicator都存在的情况下,要将原本设置给Viewpager的监听转移到ViewPagerIndicator上面.(具体原因我不清楚,但是我觉得应该是ViewPagerIndicator比较任性)
0 0
- ViewPagerIndicator使用流程记录
- AndroidUI之ViewPagerIndicator与tableLayout使用流程
- ViewPagerIndicator使用
- ViewPagerIndicator样式无效记录
- Android ViewPagerIndicator 使用示例
- ViewPagerIndicator的使用
- android ViewPagerIndicator使用心得
- viewpager+viewpagerindicator的使用
- ViewPagerIndicator的使用
- 使用TabLayout代替ViewPagerIndicator
- ViewpagerIndicator 的使用
- viewpagerindicator的使用
- ViewPagerIndicator开源库使用日记
- 使用TabLayout代替ViewPagerIndicator
- Android ViewPagerIndicator 使用示例
- ViewPagerIndicator的使用
- 最新ViewPagerIndicator的使用
- ViewPagerIndicator的使用
- [李景山php]thinkphp核心源码注释|functions.php
- ubuntu tar 命令
- .Net WebApi接口调试之Swagger集成详解
- ionic登录
- APUE 2-17 确定文件描述符个数
- ViewPagerIndicator使用流程记录
- 使用sqluldr2实现将Oracle数据无落地快速导入Greenplum数据库
- mongodb mysql数据互相导入
- Akka入门
- Spring Security学习
- spring redis session共享
- K近邻算法
- 决策树
- Cannot find Velocity template for URL [layout.vm]