①NestedScrollView与RecyclerView嵌套,导致滚动惯性消失

解决:mRecyclerView.setNestedScrollingEnabled(false);

②NestedScrollView中嵌套其他布局和RecyclerView后,不会滚动到屏幕顶部

解决给最顶部的布局View设置下requestFocus();

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"> <android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe"
android:layout_width="match_parent"
android:layout_height="match_parent"> <android.support.v4.widget.NestedScrollView
android:id="@+id/src"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"> <LinearLayout
android:id="@+id/ll_valuation_start"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"> <ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:src="@drawable/ic_launcher_background"/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="信用可也换钱花"
android:textColor="@android:color/black"
android:textSize="16sp"/> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp"
android:text="自营贷款产品,无需审核,立即放款"
android:textColor="@android:color/black"/> <android.support.v7.widget.RecyclerView android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
</android.support.v7.widget.RecyclerView> </LinearLayout> </android.support.v4.widget.NestedScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>

如果里面ScrollView里面有连个RecyclerView则都要是设置 mRecyclerView.setNestedScrollingEnabled(false);

最新文章

  1. Python:dict用法
  2. 项目发布: error CS0103: 当前上下文中不存在名称&ldquo;*****&rdquo;
  3. mapreduce计算框架
  4. ThreadPoolExecutor使用介绍
  5. BC水题--The Factor(质因分解)
  6. 移动设备、手机浏览器Javascript滑动事件代码
  7. android ListView用法介绍
  8. Amdroid示例:利用Gson生成或解析json
  9. .net通用权限框架B/S (三)--MODEL层(1)
  10. HTTP请求中POST与GET的差别
  11. C#码农的大数据之路 - 使用Azure Management API创建HDInsight集群
  12. ajax来判断用户是否登录与添加
  13. 借助扩展事件查看SQL 2016备份和还原操作的内幕
  14. Python之qq邮件
  15. 开发板访问linux方法
  16. C# 调用继电器api usb_relay_device.dll
  17. WebLogic使用总结
  18. 关于 vuex 的使用忠告
  19. Educational Codeforces Round 62 (Rated for Div. 2)
  20. Android View体系(七)从源码解析View的measure流程

热门文章

  1. Httprequest 添加Cookie
  2. Jupyter Notebook 使用入门
  3. Qt 学习之路 2(74):线程和 QObject
  4. 一个数字从后向前输入每一位数字,Camel和Pascal命名规范,IsValid()
  5. tornado 10 长轮询和 websocket
  6. vue 同一个组件的跳转, 返回时保留原来的下拉位置
  7. 在Maven打包war的时候包含空目录/空文件夹
  8. 小a的计算器
  9. python爬虫之认识爬虫和爬虫原理
  10. Sqlite CodeFirst的初级实现