From 3aaddfd5132d5206abcc5271ce78ceca6294e40e Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sat, 10 May 2025 12:59:45 +0300 Subject: [PATCH] Theme fixes --- .../kotlin/org/koitharu/kotatsu/sync/data/SyncSettings.kt | 6 +++--- app/src/main/res/layout-w600dp-land/activity_main.xml | 4 ++++ app/src/main/res/layout/activity_main.xml | 4 ++++ app/src/main/res/layout/fragment_favourites_container.xml | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/sync/data/SyncSettings.kt b/app/src/main/kotlin/org/koitharu/kotatsu/sync/data/SyncSettings.kt index fc44bbbc6..340d49019 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/sync/data/SyncSettings.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/sync/data/SyncSettings.kt @@ -18,9 +18,9 @@ class SyncSettings( @Inject constructor(@ApplicationContext context: Context) : this( context, - AccountManager.get(context) - .getAccountsByType(context.getString(R.string.account_type_sync)) - .firstOrNull(), + AccountManager.get(context)?.getAccountsByType( + context.getString(R.string.account_type_sync), + )?.firstOrNull(), ) private val accountManager = AccountManager.get(context) diff --git a/app/src/main/res/layout-w600dp-land/activity_main.xml b/app/src/main/res/layout-w600dp-land/activity_main.xml index 1b6d10d92..209d41c16 100644 --- a/app/src/main/res/layout-w600dp-land/activity_main.xml +++ b/app/src/main/res/layout-w600dp-land/activity_main.xml @@ -36,10 +36,13 @@ android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@null" android:clipToPadding="false" + android:elevation="0dp" android:fitsSystemWindows="false" android:paddingHorizontal="@dimen/margin_normal" android:stateListAnimator="@null" + app:elevation="0dp" app:liftOnScroll="false" app:liftOnScrollColor="@null"> @@ -65,6 +68,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="6dp" + android:background="@null" android:focusable="true" android:focusableInTouchMode="true" app:contentInsetStartWithNavigation="0dp" diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6016207c8..d5c96b518 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -18,10 +18,13 @@ android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@null" android:clipToPadding="false" + android:elevation="0dp" android:fitsSystemWindows="false" android:paddingHorizontal="@dimen/margin_normal" android:stateListAnimator="@null" + app:elevation="0dp" app:liftOnScroll="false" app:liftOnScrollColor="@null"> @@ -48,6 +51,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginEnd="6dp" + android:background="@null" android:focusable="true" android:focusableInTouchMode="true" app:collapseIcon="@null" diff --git a/app/src/main/res/layout/fragment_favourites_container.xml b/app/src/main/res/layout/fragment_favourites_container.xml index 553ec595e..577fbc4b7 100644 --- a/app/src/main/res/layout/fragment_favourites_container.xml +++ b/app/src/main/res/layout/fragment_favourites_container.xml @@ -11,6 +11,7 @@ android:id="@+id/tabs" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@null" app:tabGravity="start" app:tabMode="scrollable" />