From e0596997da1a48831aace8a10bb5cabef36b0a80 Mon Sep 17 00:00:00 2001 From: Cuke <> Date: Tue, 5 Jul 2022 12:57:12 +0800 Subject: [PATCH] Fix auto size padding. --- .../java/com/github/tvbox/osc/ui/activity/CollectActivity.java | 2 +- .../java/com/github/tvbox/osc/ui/activity/DetailActivity.java | 2 +- .../java/com/github/tvbox/osc/ui/activity/HistoryActivity.java | 2 +- .../java/com/github/tvbox/osc/ui/fragment/GridFragment.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/CollectActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/CollectActivity.java index b8f07c08c9..205fcd326b 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/CollectActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/CollectActivity.java @@ -56,7 +56,7 @@ private void initView() { tvDelTip = findViewById(R.id.tvDelTip); mGridView = findViewById(R.id.mGridView); mGridView.setHasFixedSize(true); - mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, 5)); + mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, isBaseOnWidth() ? 5 : 6)); collectAdapter = new CollectAdapter(); mGridView.setAdapter(collectAdapter); tvDel.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java index c294ded17e..1820939c82 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java @@ -122,7 +122,7 @@ private void initView() { mEmptyPlayList = findViewById(R.id.mEmptyPlaylist); mGridView = findViewById(R.id.mGridView); mGridView.setHasFixedSize(true); - mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, 6)); + mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, isBaseOnWidth() ? 6 : 7)); seriesAdapter = new SeriesAdapter(); mGridView.setAdapter(seriesAdapter); mGridViewFlag = findViewById(R.id.mGridViewFlag); diff --git a/app/src/main/java/com/github/tvbox/osc/ui/activity/HistoryActivity.java b/app/src/main/java/com/github/tvbox/osc/ui/activity/HistoryActivity.java index e95314d3d4..c2578d3ca8 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/activity/HistoryActivity.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/activity/HistoryActivity.java @@ -59,7 +59,7 @@ private void initView() { tvDelTip = findViewById(R.id.tvDelTip); mGridView = findViewById(R.id.mGridView); mGridView.setHasFixedSize(true); - mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, 5)); + mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, isBaseOnWidth() ? 5 : 6)); historyAdapter = new HistoryAdapter(); mGridView.setAdapter(historyAdapter); tvDel.setOnClickListener(new View.OnClickListener() { diff --git a/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java b/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java index 74b7282ec0..a86dd27b8b 100644 --- a/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java +++ b/app/src/main/java/com/github/tvbox/osc/ui/fragment/GridFragment.java @@ -64,7 +64,7 @@ private void initView() { mGridView.setHasFixedSize(true); gridAdapter = new GridAdapter(); mGridView.setAdapter(gridAdapter); - mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, 5)); + mGridView.setLayoutManager(new V7GridLayoutManager(this.mContext, isBaseOnWidth() ? 5 : 6)); gridAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { @Override public void onLoadMoreRequested() {