diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XLinearLayoutManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XLinearLayoutManager.java new file mode 100644 index 0000000000..408255e1bc --- /dev/null +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XLinearLayoutManager.java @@ -0,0 +1,31 @@ +package com.mogo.module.v2x.fragment; + +import android.content.Context; +import android.util.AttributeSet; +import android.util.Log; + +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +class V2XLinearLayoutManager extends LinearLayoutManager { + public V2XLinearLayoutManager(Context context) { + super(context); + } + + public V2XLinearLayoutManager(Context context, int orientation, boolean reverseLayout) { + super(context, orientation, reverseLayout); + } + + public V2XLinearLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + @Override + public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { + try { + super.onLayoutChildren(recycler, state); + } catch (IndexOutOfBoundsException e) { + Log.d("V2XLinearLayoutManager", "崩溃信息--"+e.toString()); + } + } +} diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XShareEventsFragment.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XShareEventsFragment.java index b270254009..b9bf2b244c 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XShareEventsFragment.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/fragment/V2XShareEventsFragment.java @@ -68,8 +68,8 @@ public class V2XShareEventsFragment extends MvpFragment 0) { dataArrayList.clear(); + Log.d("V2XShareEventsFragment","onFail--clear"); adapter.notifyDataSetChanged(); } loadingView.stopWithError(msg, View.VISIBLE);