SilentSword

Results 4 comments of SilentSword

1. app中 覆盖布局文件:permission_dialog_wait.xml LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" !--用于替换权限检查框架中的对话框布局:使对话框不可见-- /LinearLayout 2.覆盖对话框样式: 修改成透明样式 false @android:color/transparent true

java.lang.ClassCastException: android.support.v7.widget.LinearLayoutManager cannot be cast to android.support.v7.widget.StaggeredGridLayoutManager at com.andview.refreshview.XRefreshContentView.getRecyclerViewInfo(XRefreshContentView.java:520) at com.andview.refreshview.XRefreshContentView.onRecyclerViewScrolled(XRefreshContentView.java:158) at com.andview.refreshview.XRefreshContentView$2.onScrolled(XRefreshContentView.java:225) at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4618) at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3679) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3323) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:17201) at android.view.ViewGroup.layout(ViewGroup.java:5579) at com.andview.refreshview.XRefreshView.onLayout(XRefreshView.java:365) at android.view.View.layout(View.java:17201) at...

public void getRecyclerViewInfo(RecyclerView.LayoutManager layoutManager) { int[] lastPositions = null; if (layoutManagerType == null) { if (layoutManager instanceof GridLayoutManager) { layoutManagerType = LAYOUT_MANAGER_TYPE.GRID; } else if (layoutManager instanceof LinearLayoutManager) { layoutManagerType...

之前指出的地方没有问题,可能导致崩溃原因和情景是 一个RecyclerView动态切换不同类型的layoutManager 由于代码里,缓存了layoutManagerType 值,没有同步更新 layoutManager对应的类型 layoutManagerType:如果不为空,没有去重新判断新的类型,使用旧的类型,和layoutManager不能一一对应