diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-08-11 06:49:40 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-08-11 06:49:40 +0000 |
commit | a8dd4b351b1382ea73d43ada8c5f2de48d728c2f (patch) | |
tree | 74b27afb28f1d14d48b9d56940c899a77ca1bd9f /app | |
parent | b1b2b1aa714fb0e1de150d4d9a321ba0b3157261 (diff) | |
download | infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar.gz infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar.bz2 infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar.lz infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar.xz infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.tar.zst infinity-for-reddit-a8dd4b351b1382ea73d43ada8c5f2de48d728c2f.zip |
Pause autoplaying video in ViewPostDetailActivity in onPause().
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java | 16 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_post_detail.xml | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java index d46fdfe1..a150f656 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java @@ -387,6 +387,22 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS } @Override + protected void onResume() { + super.onResume(); + if (mAdapter != null && mRecyclerView != null) { + mRecyclerView.onWindowVisibilityChanged(View.VISIBLE); + } + } + + @Override + protected void onPause() { + super.onPause(); + if (mAdapter != null && mRecyclerView != null) { + mRecyclerView.onWindowVisibilityChanged(View.GONE); + } + } + + @Override public SharedPreferences getDefaultSharedPreferences() { return mSharedPreferences; } diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index a4492fc4..d250cb83 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -42,7 +42,7 @@ android:id="@+id/recycler_view_view_post_detail" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingBottom="48dp" + android:paddingBottom="144dp" android:clipToPadding="false" /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> |