NestedScrollView嵌套ViewPager滑动问题
来源:互联网 发布:身份证被盗用开了淘宝 编辑:程序博客网 时间:2024/04/30 06:30
NestedScrollView嵌套ViewPager滑动问题
NestedScrollView嵌套ViewPager布局XML展示:
<android.support.design.widget.CoordinatorLayout android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true"> <android.support.v7.widget.Toolbar android:id="@+id/my_toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" app:layout_scrollFlags="scroll|enterAlways"/> <android.support.design.widget.TabLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/my_tab_layout" android:fillViewport="false" app:tabMode="fixed"/> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.NestedScrollView android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" android:fillViewport="true" android:layout_gravity="fill_vertical" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <android.support.v4.view.ViewPager android:id="@+id/my_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> </android.support.v4.view.ViewPager> </android.support.v4.widget.NestedScrollView></android.support.design.widget.CoordinatorLayout>
主要是要给NestedScrollView设置
android:fillViewport="true" android:layout_gravity="fill_vertical"
两个属性,另一种方法就是给Viewpager设置固定的高度,也可以实现滑动效果。
0 0
- NestedScrollView嵌套ViewPager滑动问题
- 【Android学习笔记】NestedScrollView嵌套ViewPager后滑动不了的问题
- 【Android学习笔记】NestedScrollView嵌套ViewPager后滑动不了的问题
- CoordinatorLayout与NestedScrollView嵌套RecyclerView滑动问题
- NestedScrollView嵌套ViewPager
- ViewPager与NestedScrollView套嵌会引起冲突,滑动不了的问题
- 解决NestedScrollView 嵌套 RecyclerView出现的滑动冲突问题
- Android之NestedScrollView 嵌套 RecyclerView 滑动冲突的问题
- NestedScrollView嵌套RecyclerView时滑动不流畅问题的解决办法
- NestedScrollView嵌套RecyclerView时滑动不流畅问题的解决办法
- NestedScrollView嵌套RecyclerView时滑动不流畅问题的解决办法
- NestedScrollView嵌套RecyclerView时滑动不流畅问题的解决办法
- NestedScrollView嵌套RecycleView滑动卡顿问题处理
- NestedScrollView嵌套RecyclerView滑动到底部事件冲突问题
- 解决NestedScrollView中嵌套RecyclerView滑动冲突问题
- NestedScrollView嵌套RecyclerView时滑动不流畅问题的解决办法
- viewpager嵌套的滑动问题~~
- NestedScrollView嵌套RecyclerView滑动冲突
- 算法-第四版-练习1.3.15解答
- 线程讨论
- 131. Palindrome Partitioning
- 【C语言小程序】调用CMD命令使用文件资源管理器打开FTP
- 转!!程序员进阶路线
- NestedScrollView嵌套ViewPager滑动问题
- plsql中文乱码,显示问号
- notepad matlab 语法高亮
- 针对Elasticsearch的开源分析及可视化平台——Kibana
- 《大数据原理与实践》第2次公开课:Concept
- 优质验证码短信接口平台推荐
- MySql 5.7 主从库配置方案(Master/Slave)
- std::string VS string 和 error:'string' does not name a type
- MyEclipse注解模板