|
|
@@ -30,7 +30,8 @@ import me.everything.android.ui.overscroll.OverScrollDecoratorHelper;
|
|
|
public class MainSeriesView extends ConstraintLayout implements IMainSeriesContract.View {
|
|
|
|
|
|
private IMainSeriesContract.Presenter presenter;
|
|
|
- CustomImageTextAdapter customImageTextAdapter;
|
|
|
+ private CustomImageTextAdapter customImageTextAdapter;
|
|
|
+ private RecyclerView recyclerView;
|
|
|
|
|
|
public void setPresenter(IMainSeriesContract.Presenter presenter) {
|
|
|
this.presenter = presenter;
|
|
|
@@ -56,7 +57,7 @@ public class MainSeriesView extends ConstraintLayout implements IMainSeriesContr
|
|
|
public void init(Context context, List<CategoryRecommendBean> recommendBeans, int itemCount) {
|
|
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
|
inflater.inflate(R.layout.main_series_view, this);
|
|
|
- RecyclerView recyclerView = findViewById(R.id.main_category_recycler_view);
|
|
|
+ recyclerView = findViewById(R.id.main_category_recycler_view);
|
|
|
|
|
|
|
|
|
recyclerView.setLayoutManager(new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false));
|
|
|
@@ -84,4 +85,8 @@ public class MainSeriesView extends ConstraintLayout implements IMainSeriesContr
|
|
|
presenter = null;
|
|
|
customImageTextAdapter = null;
|
|
|
}
|
|
|
+
|
|
|
+ public RecyclerView.LayoutManager getLayoutManager() {
|
|
|
+ return recyclerView.getLayoutManager();
|
|
|
+ }
|
|
|
}
|