From 2504f42f7b1ba0c2207a2fc6952691ac0595977f Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sun, 14 Apr 2024 16:13:41 +0200 Subject: [PATCH] Apply window insets to SwipeRefreshLayout in AccountActivity to not obscure spinner (#4371) before & after --- .../keylesspalace/tusky/components/account/AccountActivity.kt | 4 ++++ app/src/main/res/values/dimens.xml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt b/app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt index 66aa8a1c..58e51438 100644 --- a/app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/components/account/AccountActivity.kt @@ -318,6 +318,10 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide bottom = bottom, left = left ) + binding.swipeToRefreshLayout.setProgressViewEndTarget( + false, + top + resources.getDimensionPixelSize(R.dimen.account_swiperefresh_distance) + ) WindowInsetsCompat.CONSUMED } diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index ece33470..c6f26d48 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -73,4 +73,6 @@ 8dp 0dp + 64dp +