From f305a59880c6dc346a9753d4b380f0b614e0bfcf Mon Sep 17 00:00:00 2001 From: tarsin Date: Fri, 27 May 2022 00:26:48 +0800 Subject: [PATCH] Revert "Drop rikkax" This reverts commit 87d284ad97e0740d6e1f65f742be987c14971450. --- app/build.gradle | 3 ++ .../com/hippo/drawable/AddDeleteDrawable.java | 3 +- .../hippo/drawable/DrawerArrowDrawable.java | 8 ++- .../com/hippo/ehviewer/EhApplication.java | 6 +++ .../com/hippo/ehviewer/ui/EhActivity.java | 54 +++++++++++++++---- .../hippo/ehviewer/ui/GalleryActivity.java | 29 +++++++++- .../ui/fragment/AdvancedFragment.java | 17 ++++++ .../ehviewer/ui/fragment/EhFragment.java | 7 +++ .../ehviewer/ui/fragment/FilterFragment.java | 4 +- .../ehviewer/ui/fragment/HostsFragment.java | 4 +- .../ehviewer/ui/fragment/MyTagsFragment.java | 2 + .../ehviewer/ui/fragment/UConfigFragment.java | 2 + .../ehviewer/ui/scene/DownloadsScene.java | 4 +- .../ehviewer/ui/scene/FavoritesScene.java | 14 +++-- .../ui/scene/GalleryCommentsScene.java | 10 ++-- .../ehviewer/ui/scene/GalleryDetailScene.java | 7 +-- .../ehviewer/ui/scene/GalleryInfoScene.java | 4 +- .../ehviewer/ui/scene/GalleryListScene.java | 16 ++++-- .../ehviewer/ui/scene/WebViewSignInScene.java | 2 + .../ehviewer/widget/GalleryGuideView.java | 4 ++ .../com/hippo/ehviewer/widget/SearchBar.java | 4 +- .../java/com/hippo/scene/SceneFragment.java | 3 ++ app/src/main/res/layout/activity_filter.xml | 7 ++- app/src/main/res/layout/activity_hosts.xml | 7 ++- app/src/main/res/layout/activity_main.xml | 5 +- .../main/res/layout/activity_preference.xml | 6 ++- app/src/main/res/layout/activity_webview.xml | 4 +- .../main/res/layout/gallery_detail_header.xml | 8 +-- .../res/layout/gallery_detail_previews.xml | 3 +- .../res/layout/preference_recyclerview.xml | 2 + .../main/res/layout/scene_cookie_sign_in.xml | 3 +- app/src/main/res/layout/scene_download.xml | 9 ++-- app/src/main/res/layout/scene_favorites.xml | 9 ++-- .../res/layout/scene_gallery_comments.xml | 12 +++-- .../main/res/layout/scene_gallery_detail.xml | 6 ++- .../main/res/layout/scene_gallery_info.xml | 4 +- .../main/res/layout/scene_gallery_list.xml | 15 ++++-- .../res/layout/scene_gallery_previews.xml | 4 +- app/src/main/res/layout/scene_history.xml | 10 ++-- app/src/main/res/layout/scene_login.xml | 3 +- app/src/main/res/layout/scene_progress.xml | 4 +- app/src/main/res/layout/scene_select_site.xml | 3 +- app/src/main/res/layout/scene_warning.xml | 3 +- app/src/main/res/values/arrays.xml | 6 +++ app/src/main/res/values/themes.xml | 1 + app/src/main/res/xml/eh_settings.xml | 9 ++++ 46 files changed, 281 insertions(+), 69 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d40016087..0d99e019b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -126,6 +126,8 @@ dependencies { implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.9.3' implementation 'com.takisoft.preferencex:preferencex:1.1.0' implementation 'com.gitlab.NekoInverter:yorozuya:723dc867a9' + implementation 'dev.rikka.rikkax.appcompat:appcompat:1.4.1' + implementation 'dev.rikka.rikkax.material:material:2.4.0' implementation 'dev.rikka.rikkax.preference:simplemenu-preference:1.0.3' implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.greenrobot:greendao:3.3.0' @@ -148,5 +150,6 @@ configurations.all { exclude group: 'com.github.seven332', module: 'okhttp' exclude group: 'com.github.seven332', module: 'image' exclude group: 'com.github.seven332', module: 'yorozuya' + exclude group: 'androidx.appcompat', module: 'appcompat' } } diff --git a/app/src/main/java/com/hippo/drawable/AddDeleteDrawable.java b/app/src/main/java/com/hippo/drawable/AddDeleteDrawable.java index d37f782c9..f511ff43b 100644 --- a/app/src/main/java/com/hippo/drawable/AddDeleteDrawable.java +++ b/app/src/main/java/com/hippo/drawable/AddDeleteDrawable.java @@ -47,12 +47,13 @@ public class AddDeleteDrawable extends Drawable { /** * @param context used to get the configuration for the drawable from */ - public AddDeleteDrawable(Context context) { + public AddDeleteDrawable(Context context, int color) { Resources resources = context.getResources(); mSize = resources.getDimensionPixelSize(R.dimen.add_size); float barThickness = Math.round(resources.getDimension(R.dimen.add_thickness)); + mPaint.setColor(color); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeJoin(Paint.Join.MITER); mPaint.setStrokeCap(Paint.Cap.BUTT); diff --git a/app/src/main/java/com/hippo/drawable/DrawerArrowDrawable.java b/app/src/main/java/com/hippo/drawable/DrawerArrowDrawable.java index dbf1fa233..51ea44eb1 100644 --- a/app/src/main/java/com/hippo/drawable/DrawerArrowDrawable.java +++ b/app/src/main/java/com/hippo/drawable/DrawerArrowDrawable.java @@ -67,10 +67,11 @@ public class DrawerArrowDrawable extends Drawable { /** * @param context used to get the configuration for the drawable from */ - public DrawerArrowDrawable(Context context) { + public DrawerArrowDrawable(Context context, int color) { Resources resources = context.getResources(); mPaint.setAntiAlias(true); + mPaint.setColor(color); mSize = resources.getDimensionPixelSize(R.dimen.dad_drawable_size); // round this because having this floating may cause bad measurements mBarSize = Math.round(resources.getDimension(R.dimen.dad_bar_size)); @@ -144,6 +145,11 @@ public class DrawerArrowDrawable extends Drawable { canvas.restore(); } + public void setColor(@ColorInt int color) { + mPaint.setColor(color); + invalidateSelf(); + } + @Override public void setAlpha(int i) { mPaint.setAlpha(i); diff --git a/app/src/main/java/com/hippo/ehviewer/EhApplication.java b/app/src/main/java/com/hippo/ehviewer/EhApplication.java index 428c2795a..8373ca656 100644 --- a/app/src/main/java/com/hippo/ehviewer/EhApplication.java +++ b/app/src/main/java/com/hippo/ehviewer/EhApplication.java @@ -91,6 +91,8 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; +import rikka.material.app.DayNightDelegate; +import rikka.material.app.LocaleDelegate; public class EhApplication extends SceneApplication { @@ -334,6 +336,10 @@ public class EhApplication extends SceneApplication { EhDB.mergeOldDB(this); } + LocaleDelegate.setDefaultLocale(Settings.getLocale()); + DayNightDelegate.setApplicationContext(this); + DayNightDelegate.setDefaultNightMode(Settings.getTheme()); + // Do io tasks in new thread //noinspection deprecation new AsyncTask() { diff --git a/app/src/main/java/com/hippo/ehviewer/ui/EhActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/EhActivity.java index 1b339bda0..aa3d8d880 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/EhActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/EhActivity.java @@ -18,18 +18,25 @@ package com.hippo.ehviewer.ui; import android.content.Context; import android.content.res.Configuration; +import android.content.res.Resources; import android.graphics.Color; import android.os.Bundle; import android.view.Window; +import android.view.WindowInsets; import android.view.WindowManager; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatActivity; +import androidx.annotation.StyleRes; import com.hippo.ehviewer.EhApplication; +import com.hippo.ehviewer.R; import com.hippo.ehviewer.Settings; -public abstract class EhActivity extends AppCompatActivity { +import rikka.core.res.ResourcesKt; +import rikka.material.app.MaterialActivity; + +public abstract class EhActivity extends MaterialActivity { private static final String THEME_DEFAULT = "DEFAULT"; private static final String THEME_BLACK = "BLACK"; @@ -48,16 +55,27 @@ public abstract class EhActivity extends AppCompatActivity { return (configuration.uiMode & Configuration.UI_MODE_NIGHT_YES) > 0; } + @Override + public void onApplyUserThemeResource(@NonNull Resources.Theme theme, boolean isDecorView) { + theme.applyStyle(getThemeStyleRes(this), true); + } + + @Override + public String computeUserThemeKey() { + return getTheme(this); + } + + @StyleRes + public int getThemeStyleRes(Context context) { + if (THEME_BLACK.equals(getTheme(context))) { + return R.style.ThemeOverlay_Black; + } + return R.style.ThemeOverlay; + } + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); - Window window = getWindow(); - window.setStatusBarColor(Color.TRANSPARENT); - - window.getDecorView().post(() -> { - window.setNavigationBarColor(Color.TRANSPARENT); - window.setNavigationBarContrastEnforced(true); - }); ((EhApplication) getApplication()).registerActivity(this); } @@ -77,4 +95,22 @@ public abstract class EhActivity extends AppCompatActivity { getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE); } } + + @Override + public void onApplyTranslucentSystemBars() { + super.onApplyTranslucentSystemBars(); + Window window = getWindow(); + window.setStatusBarColor(Color.TRANSPARENT); + + window.getDecorView().post(() -> { + WindowInsets rootWindowInsets = window.getDecorView().getRootWindowInsets(); + if (rootWindowInsets != null && rootWindowInsets.getSystemWindowInsetBottom() >= Resources.getSystem().getDisplayMetrics().density * 40) { + window.setNavigationBarColor(ResourcesKt.resolveColor(getTheme(), android.R.attr.navigationBarColor) & 0x00ffffff | -0x20000000); + window.setNavigationBarContrastEnforced(false); + } else { + window.setNavigationBarColor(Color.TRANSPARENT); + window.setNavigationBarContrastEnforced(true); + } + }); + } } diff --git a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java index 69d0d86fd..111ea416d 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/GalleryActivity.java @@ -103,6 +103,10 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import rikka.core.res.ConfigurationKt; +import rikka.core.res.ResourcesKt; +import rikka.material.app.DayNightDelegate; + public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChangeListener, GalleryView.Listener { @@ -290,6 +294,24 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan outState.putInt(KEY_CURRENT_INDEX, mCurrentIndex); } + @Override + protected void attachBaseContext(@NonNull Context newBase) { + switch (Settings.getReadTheme()) { + case 1: + getDayNightDelegate().setLocalNightMode(DayNightDelegate.MODE_NIGHT_YES, false); + break; + case 2: + getDayNightDelegate().setLocalNightMode(DayNightDelegate.MODE_NIGHT_NO, false); + break; + } + super.attachBaseContext(newBase); + } + + @Override + public boolean respectDefaultNightMode() { + return Settings.getReadTheme() == 0; + } + @Override @SuppressWarnings({"WrongConstant"}) protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -330,13 +352,15 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan .setScaleMode(Settings.getPageScaling()) .setStartPosition(Settings.getStartPosition()) .setStartPage(startPage) - .setEdgeColor(0) + .setBackgroundColor(ResourcesKt.resolveColor(getTheme(), android.R.attr.colorBackground)) + .setEdgeColor(ResourcesKt.resolveColor(getTheme(), R.attr.colorEdgeEffect) & 0xffffff | 0x33000000) .setPagerInterval(Settings.getShowPageInterval() ? resources.getDimensionPixelOffset(R.dimen.gallery_pager_interval) : 0) .setScrollInterval(Settings.getShowPageInterval() ? resources.getDimensionPixelOffset(R.dimen.gallery_scroll_interval) : 0) .setPageMinHeight(resources.getDimensionPixelOffset(R.dimen.gallery_page_min_height)) .setPageInfoInterval(resources.getDimensionPixelOffset(R.dimen.gallery_page_info_interval)) .setProgressColor(ResourcesUtils.getAttrColor(this, androidx.appcompat.R.attr.colorPrimary)) .setProgressSize(resources.getDimensionPixelOffset(R.dimen.gallery_progress_size)) + .setPageTextColor(ResourcesKt.resolveColor(getTheme(), android.R.attr.textColorSecondary)) .setPageTextSize(resources.getDimensionPixelOffset(R.dimen.gallery_page_text_size)) .setPageTextTypeface(Typeface.DEFAULT) .setErrorTextColor(resources.getColor(R.color.red_500)) @@ -360,6 +384,9 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan insetsController.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_BARS_BY_TOUCH); insetsController.show(WindowInsetsCompat.Type.systemBars()); } + boolean night = ConfigurationKt.isNight(getResources().getConfiguration()); + insetsController.setAppearanceLightStatusBars(!night); + insetsController.setAppearanceLightNavigationBars(!night); } mMaskView = (ColorView) ViewUtils.$$(this, R.id.mask); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/AdvancedFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/AdvancedFragment.java index 8b08e906c..aa4e41aa2 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/AdvancedFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/AdvancedFragment.java @@ -54,6 +54,8 @@ import java.util.Locale; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; +import rikka.material.app.LocaleDelegate; + public class AdvancedFragment extends BasePreferenceFragment { private static final String KEY_DUMP_LOGCAT = "dump_logcat"; @@ -284,6 +286,21 @@ public class AdvancedFragment extends BasePreferenceFragment { return false; } + @Override + public boolean onPreferenceChange(Preference preference, Object newValue) { + String key = preference.getKey(); + if (KEY_APP_LANGUAGE.equals(key)) { + if ("system".equals(newValue)) { + LocaleDelegate.setDefaultLocale(LocaleDelegate.getSystemLocale()); + } else { + LocaleDelegate.setDefaultLocale(Locale.forLanguageTag((String) newValue)); + } + requireActivity().recreate(); + return true; + } + return false; + } + @Override public int getFragmentTitle() { return R.string.settings_advanced; diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/EhFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/EhFragment.java index d0442f2dc..789e720fd 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/EhFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/EhFragment.java @@ -27,12 +27,16 @@ import com.hippo.ehviewer.R; import com.hippo.ehviewer.Settings; import com.hippo.ehviewer.client.EhTagDatabase; +import rikka.material.app.DayNightDelegate; + public class EhFragment extends BasePreferenceFragment { @Override public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) { addPreferencesFromResource(R.xml.eh_settings); + Preference theme = findPreference(Settings.KEY_THEME); + Preference blackDarkTheme = findPreference(Settings.KEY_BLACK_DARK_THEME); Preference gallerySite = findPreference(Settings.KEY_GALLERY_SITE); Preference listMode = findPreference(Settings.KEY_LIST_MODE); Preference detailSize = findPreference(Settings.KEY_DETAIL_SIZE); @@ -40,11 +44,13 @@ public class EhFragment extends BasePreferenceFragment { Preference showTagTranslations = findPreference(Settings.KEY_SHOW_TAG_TRANSLATIONS); Preference tagTranslationsSource = findPreference("tag_translations_source"); + theme.setOnPreferenceChangeListener(this); gallerySite.setOnPreferenceChangeListener(this); listMode.setOnPreferenceChangeListener(this); detailSize.setOnPreferenceChangeListener(this); thumbSize.setOnPreferenceChangeListener(this); showTagTranslations.setOnPreferenceChangeListener(this); + blackDarkTheme.setOnPreferenceChangeListener(this); if (!EhTagDatabase.isPossible(requireActivity())) { getPreferenceScreen().removePreference(showTagTranslations); @@ -56,6 +62,7 @@ public class EhFragment extends BasePreferenceFragment { public boolean onPreferenceChange(Preference preference, Object newValue) { String key = preference.getKey(); if (Settings.KEY_THEME.equals(key)) { + DayNightDelegate.setDefaultNightMode(Integer.parseInt((String) newValue)); requireActivity().recreate(); return true; } else if (Settings.KEY_GALLERY_SITE.equals(key)) { diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/FilterFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/FilterFragment.java index 9b083e866..542a02604 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/FilterFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/FilterFragment.java @@ -38,6 +38,8 @@ import com.hippo.yorozuya.ViewUtils; import java.util.List; +import rikka.core.res.ResourcesKt; + public class FilterFragment extends BaseFragment { @Nullable @@ -76,7 +78,7 @@ public class FilterFragment extends BaseFragment { recyclerView.setClipChildren(false); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(requireActivity().getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(requireActivity(), 1)); decoration.setShowLastDivider(true); recyclerView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/HostsFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/HostsFragment.java index 0690de459..099a87f77 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/HostsFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/HostsFragment.java @@ -30,6 +30,8 @@ import com.hippo.yorozuya.ViewUtils; import java.util.List; import java.util.Locale; +import rikka.core.res.ResourcesKt; + public class HostsFragment extends BaseFragment implements View.OnClickListener { @@ -67,7 +69,7 @@ public class HostsFragment extends BaseFragment recyclerView.setLayoutManager(new LinearLayoutManager(requireActivity(), RecyclerView.VERTICAL, false)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(requireActivity().getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(requireActivity(), 1)); decoration.setShowLastDivider(true); recyclerView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/MyTagsFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/MyTagsFragment.java index 348a559a7..3e5d3abf6 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/MyTagsFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/MyTagsFragment.java @@ -22,6 +22,7 @@ import com.hippo.ehviewer.widget.DialogWebChromeClient; import okhttp3.Cookie; import okhttp3.HttpUrl; +import rikka.core.res.ResourcesKt; public class MyTagsFragment extends BaseFragment { @@ -35,6 +36,7 @@ public class MyTagsFragment extends BaseFragment { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.activity_webview, container, false); webView = view.findViewById(R.id.webview); + webView.setBackgroundColor(ResourcesKt.resolveColor(requireActivity().getTheme(), android.R.attr.colorBackground)); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setDisplayZoomControls(false); webView.getSettings().setJavaScriptEnabled(true); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/fragment/UConfigFragment.java b/app/src/main/java/com/hippo/ehviewer/ui/fragment/UConfigFragment.java index 146b2d8c5..0bae779ea 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/fragment/UConfigFragment.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/fragment/UConfigFragment.java @@ -26,6 +26,7 @@ import com.hippo.ehviewer.widget.DialogWebChromeClient; import okhttp3.Cookie; import okhttp3.HttpUrl; +import rikka.core.res.ResourcesKt; public class UConfigFragment extends BaseFragment { @@ -40,6 +41,7 @@ public class UConfigFragment extends BaseFragment { public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.activity_webview, container, false); webView = view.findViewById(R.id.webview); + webView.setBackgroundColor(ResourcesKt.resolveColor(requireActivity().getTheme(), android.R.attr.colorBackground)); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setDisplayZoomControls(false); webView.getSettings().setJavaScriptEnabled(true); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/DownloadsScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/DownloadsScene.java index 52f26f61b..c483fabc3 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/DownloadsScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/DownloadsScene.java @@ -113,6 +113,8 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import rikka.core.res.ResourcesKt; + @SuppressLint("RtlHardcoded") public class DownloadsScene extends ToolbarScene implements DownloadManager.DownloadInfoListener, @@ -649,7 +651,7 @@ public class DownloadsScene extends ToolbarScene recyclerView.setLayoutManager(new LinearLayoutManager(context)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setShowLastDivider(true); recyclerView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.java index bfaa2eeaa..0d94d7cee 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/FavoritesScene.java @@ -90,6 +90,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import rikka.core.res.ResourcesKt; + // TODO Get favorite, modify favorite, add favorite, what a mess! @SuppressLint("RtlHardcoded") public class FavoritesScene extends BaseScene implements @@ -281,7 +283,7 @@ public class FavoritesScene extends BaseScene implements fastScroller.setPadding(fastScroller.getPaddingLeft(), fastScroller.getPaddingTop() + paddingTopSB, fastScroller.getPaddingRight(), fastScroller.getPaddingBottom()); - mLeftDrawable = new DrawerArrowDrawable(context); + mLeftDrawable = new DrawerArrowDrawable(context, ResourcesKt.resolveColor(getTheme(), android.R.attr.colorControlNormal)); mSearchBar.setLeftDrawable(mLeftDrawable); mSearchBar.setRightDrawable(ContextCompat.getDrawable(context, R.drawable.v_magnify_x24)); mSearchBar.setHelper(this); @@ -289,7 +291,13 @@ public class FavoritesScene extends BaseScene implements updateSearchBar(); mSearchBarMover = new SearchBarMover(this, mSearchBar, mRecyclerView); - mActionFabDrawable = new AddDeleteDrawable(context); + int colorID; + if (EhActivity.isNightMode(context.getResources().getConfiguration())) { + colorID = resources.getColor(android.R.color.white, getTheme()); + } else { + colorID = resources.getColor(android.R.color.black, getTheme()); + } + mActionFabDrawable = new AddDeleteDrawable(context, colorID); mFabLayout.getPrimaryFab().setImageDrawable(mActionFabDrawable); mFabLayout.setExpanded(false, false); mFabLayout.setAutoCancel(true); @@ -446,7 +454,7 @@ public class FavoritesScene extends BaseScene implements recyclerView.setLayoutManager(new LinearLayoutManager(context)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setShowLastDivider(true); recyclerView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java index 3b92653c4..9cf756af7 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryCommentsScene.java @@ -93,6 +93,8 @@ import com.hippo.yorozuya.collect.IntList; import java.util.ArrayList; import java.util.List; +import rikka.core.res.ResourcesKt; + public final class GalleryCommentsScene extends ToolbarScene implements View.OnClickListener, SwipeRefreshLayout.OnRefreshListener { @@ -209,7 +211,7 @@ public final class GalleryCommentsScene extends ToolbarScene mRecyclerView.setLayoutManager(new LinearLayoutManager(context, RecyclerView.VERTICAL, false)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( - LinearDividerItemDecoration.VERTICAL, 0, + LinearDividerItemDecoration.VERTICAL, ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setShowLastDivider(true); mRecyclerView.addItemDecoration(decoration); @@ -327,7 +329,7 @@ public final class GalleryCommentsScene extends ToolbarScene }); rv.setLayoutManager(new LinearLayoutManager(context)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( - LinearDividerItemDecoration.VERTICAL, 0, + LinearDividerItemDecoration.VERTICAL, ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setPadding(ResourcesUtils.getAttrDimensionPixelOffset(context, androidx.appcompat.R.attr.dialogPreferredPadding)); rv.addItemDecoration(decoration); @@ -877,7 +879,7 @@ public final class GalleryCommentsScene extends ToolbarScene SpannableString ss = new SpannableString(scoreString); ss.setSpan(new RelativeSizeSpan(0.8f), 0, scoreString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new StyleSpan(Typeface.BOLD), 0, scoreString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - ss.setSpan(new ForegroundColorSpan(0) + ss.setSpan(new ForegroundColorSpan(ResourcesKt.resolveColor(getTheme(), android.R.attr.textColorSecondary)) , 0, scoreString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); ssb.append(" ").append(ss); } @@ -887,7 +889,7 @@ public final class GalleryCommentsScene extends ToolbarScene SpannableString ss = new SpannableString(str); ss.setSpan(new RelativeSizeSpan(0.8f), 0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(new StyleSpan(Typeface.BOLD), 0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - ss.setSpan(new ForegroundColorSpan(0), + ss.setSpan(new ForegroundColorSpan(ResourcesKt.resolveColor(getTheme(), android.R.attr.textColorSecondary)), 0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); ssb.append("\n\n").append(ss); } diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java index 5c0847931..f851b6a1c 100755 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java @@ -135,6 +135,7 @@ import java.util.ArrayList; import java.util.List; import okhttp3.HttpUrl; +import rikka.core.res.ResourcesKt; public class GalleryDetailScene extends BaseScene implements View.OnClickListener, com.hippo.ehviewer.download.DownloadManager.DownloadInfoListener, @@ -831,7 +832,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene } if ((oldState == STATE_INIT || oldState == STATE_FAILED || oldState == STATE_REFRESH) && - (state == STATE_NORMAL || state == STATE_REFRESH_HEADER)) { + (state == STATE_NORMAL || state == STATE_REFRESH_HEADER) && ResourcesKt.resolveBoolean(getTheme(), androidx.appcompat.R.attr.isLightTheme, false)) { if (!createCircularReveal()) { SimpleHandler.getInstance().post(this::createCircularReveal); } @@ -951,8 +952,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene } EhTagDatabase ehTags = Settings.getShowTagTranslations() ? EhTagDatabase.getInstance(context) : null; - int colorTag = 0; - int colorName = 0; + int colorTag = ResourcesKt.resolveColor(getTheme(), R.attr.tagBackgroundColor); + int colorName = ResourcesKt.resolveColor(getTheme(), R.attr.tagGroupBackgroundColor); for (GalleryTagGroup tg : tagGroups) { LinearLayout ll = (LinearLayout) inflater.inflate(R.layout.gallery_tag_group, mTags, false); ll.setOrientation(LinearLayout.HORIZONTAL); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java index 727d574d8..57e8ecc31 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java @@ -43,6 +43,8 @@ import com.hippo.yorozuya.ViewUtils; import java.util.ArrayList; +import rikka.core.res.ResourcesKt; + public final class GalleryInfoScene extends ToolbarScene { public static final String KEY_GALLERY_DETAIL = "gallery_detail"; @@ -164,7 +166,7 @@ public final class GalleryInfoScene extends ToolbarScene { mRecyclerView.setLayoutManager(new LinearLayoutManager(context, RecyclerView.VERTICAL, false)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); int keylineMargin = context.getResources().getDimensionPixelOffset(R.dimen.keyline_margin); decoration.setPadding(keylineMargin); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java index f055e6c1d..c9e8a0ae7 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryListScene.java @@ -126,6 +126,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import rikka.core.res.ResourcesKt; + @SuppressLint("RtlHardcoded") public final class GalleryListScene extends BaseScene implements SearchBar.Helper, SearchBar.OnStateChangeListener, FastScroller.OnDragHandlerListener, @@ -592,8 +594,8 @@ public final class GalleryListScene extends BaseScene fastScroller.setPadding(fastScroller.getPaddingLeft(), fastScroller.getPaddingTop() + paddingTopSB, fastScroller.getPaddingRight(), fastScroller.getPaddingBottom()); - mLeftDrawable = new DrawerArrowDrawable(context); - mRightDrawable = new AddDeleteDrawable(context); + mLeftDrawable = new DrawerArrowDrawable(context, ResourcesKt.resolveColor(getTheme(), android.R.attr.colorControlNormal)); + mRightDrawable = new AddDeleteDrawable(context, ResourcesKt.resolveColor(getTheme(), android.R.attr.colorControlNormal)); mSearchBar.setLeftDrawable(mLeftDrawable); mSearchBar.setRightDrawable(mRightDrawable); mSearchBar.setHelper(this); @@ -612,7 +614,13 @@ public final class GalleryListScene extends BaseScene mFabLayout.setOnExpandListener(this); addAboveSnackView(mFabLayout); - mActionFabDrawable = new AddDeleteDrawable(context); + int colorID; + if (EhActivity.isNightMode(context.getResources().getConfiguration())) { + colorID = resources.getColor(android.R.color.white, getTheme()); + } else { + colorID = resources.getColor(android.R.color.black, getTheme()); + } + mActionFabDrawable = new AddDeleteDrawable(context, colorID); mFabLayout.getPrimaryFab().setImageDrawable(mActionFabDrawable); mSearchFab.setOnClickListener(this); @@ -794,7 +802,7 @@ public final class GalleryListScene extends BaseScene recyclerView.setLayoutManager(new LinearLayoutManager(context)); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setShowLastDivider(true); recyclerView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/WebViewSignInScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/WebViewSignInScene.java index e8352a0a4..1fce4f994 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/WebViewSignInScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/WebViewSignInScene.java @@ -42,6 +42,7 @@ import java.util.List; import okhttp3.Cookie; import okhttp3.HttpUrl; +import rikka.core.res.ResourcesKt; public class WebViewSignInScene extends SolidScene { @@ -73,6 +74,7 @@ public class WebViewSignInScene extends SolidScene { cookieManager.removeSessionCookies(null); mWebView = new WebView(context); + mWebView.setBackgroundColor(ResourcesKt.resolveColor(getTheme(), android.R.attr.colorBackground)); mWebView.getSettings().setBuiltInZoomControls(true); mWebView.getSettings().setDisplayZoomControls(false); mWebView.getSettings().setJavaScriptEnabled(true); diff --git a/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java b/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java index cd42b7669..5cc25a0ef 100644 --- a/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java +++ b/app/src/main/java/com/hippo/ehviewer/widget/GalleryGuideView.java @@ -29,6 +29,8 @@ import com.hippo.ehviewer.R; import com.hippo.ehviewer.Settings; import com.hippo.yorozuya.ViewUtils; +import rikka.core.res.ResourcesKt; + public class GalleryGuideView extends ViewGroup implements View.OnClickListener { private final float[] mPoints = new float[3 * 4]; @@ -58,7 +60,9 @@ public class GalleryGuideView extends ViewGroup implements View.OnClickListener } private void init(Context context) { + mBgColor = ResourcesKt.resolveColor(context.getTheme(), R.attr.guideBackgroundColor); mPaint = new Paint(); + mPaint.setColor(ResourcesKt.resolveColor(context.getTheme(), R.attr.guideTitleColor)); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeWidth(context.getResources().getDimension(R.dimen.gallery_guide_divider_width)); setOnClickListener(this); diff --git a/app/src/main/java/com/hippo/ehviewer/widget/SearchBar.java b/app/src/main/java/com/hippo/ehviewer/widget/SearchBar.java index 6125a2f50..05f579661 100644 --- a/app/src/main/java/com/hippo/ehviewer/widget/SearchBar.java +++ b/app/src/main/java/com/hippo/ehviewer/widget/SearchBar.java @@ -60,6 +60,8 @@ import com.hippo.yorozuya.ViewUtils; import java.util.ArrayList; import java.util.List; +import rikka.core.res.ResourcesKt; + public class SearchBar extends MaterialCardView implements View.OnClickListener, TextView.OnEditorActionListener, TextWatcher, SearchEditText.SearchEditTextListener { @@ -146,7 +148,7 @@ public class SearchBar extends MaterialCardView implements View.OnClickListener, LinearLayoutManager layoutManager = new LinearLayoutManager(context); LinearDividerItemDecoration decoration = new LinearDividerItemDecoration( LinearDividerItemDecoration.VERTICAL, - 0, + ResourcesKt.resolveColor(context.getTheme(), R.attr.dividerColor), LayoutUtils.dp2pix(context, 1)); decoration.setShowLastDivider(false); mListView.addItemDecoration(decoration); diff --git a/app/src/main/java/com/hippo/scene/SceneFragment.java b/app/src/main/java/com/hippo/scene/SceneFragment.java index d7d243079..2b3a7521a 100644 --- a/app/src/main/java/com/hippo/scene/SceneFragment.java +++ b/app/src/main/java/com/hippo/scene/SceneFragment.java @@ -34,6 +34,8 @@ import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.List; +import rikka.core.res.ResourcesKt; + public class SceneFragment extends Fragment { public static final int LAUNCH_MODE_STANDARD = 0; @@ -112,6 +114,7 @@ public class SceneFragment extends Fragment { super.onViewCreated(view, savedInstanceState); view.setTag(R.id.fragment_tag, getTag()); + view.setBackground(ResourcesKt.resolveDrawable(requireActivity().getTheme(), android.R.attr.windowBackground)); // Notify FragmentActivity activity = getActivity(); diff --git a/app/src/main/res/layout/activity_filter.xml b/app/src/main/res/layout/activity_filter.xml index e5a45b6cd..75c22b801 100644 --- a/app/src/main/res/layout/activity_filter.xml +++ b/app/src/main/res/layout/activity_filter.xml @@ -22,7 +22,8 @@ + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="bottom" /> + android:text="@string/no_filter" + app:fitsSystemWindowsInsets="bottom" /> diff --git a/app/src/main/res/layout/activity_hosts.xml b/app/src/main/res/layout/activity_hosts.xml index 9aa5553d1..a4b7f4dc9 100644 --- a/app/src/main/res/layout/activity_hosts.xml +++ b/app/src/main/res/layout/activity_hosts.xml @@ -24,7 +24,8 @@ android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" - android:clipToPadding="false" /> + android:clipToPadding="false" + app:fitsSystemWindowsInsets="bottom" /> + android:textSize="@dimen/text_super_large" + app:fitsSystemWindowsInsets="bottom" /> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index f409f01f6..e30d1dfd7 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -18,7 +18,10 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:clipChildren="false"> + android:clipChildren="false" + app:consumeSystemWindowsInsets="start|end" + app:edgeToEdge="true" + app:fitsSystemWindowsInsets="start|end"> + android:orientation="vertical" + app:consumeSystemWindowsInsets="start|end" + app:edgeToEdge="true" + app:fitsSystemWindowsInsets="start|end"> + android:orientation="vertical" + app:fitsSystemWindowsInsets="bottom"> + android:elevation="4dp" + app:fitsSystemWindowsInsets="top" /> + android:layout_height="wrap_content" + app:fitsSystemWindowsInsets="top"> diff --git a/app/src/main/res/layout/gallery_detail_previews.xml b/app/src/main/res/layout/gallery_detail_previews.xml index c64550ac6..396878742 100644 --- a/app/src/main/res/layout/gallery_detail_previews.xml +++ b/app/src/main/res/layout/gallery_detail_previews.xml @@ -25,7 +25,8 @@ android:focusable="true" android:orientation="vertical" android:padding="@dimen/keyline_margin" - android:showDividers="middle"> + android:showDividers="middle" + app:fitsSystemWindowsInsets="bottom"> diff --git a/app/src/main/res/layout/scene_cookie_sign_in.xml b/app/src/main/res/layout/scene_cookie_sign_in.xml index 571fedb07..3d862d20d 100644 --- a/app/src/main/res/layout/scene_cookie_sign_in.xml +++ b/app/src/main/res/layout/scene_cookie_sign_in.xml @@ -20,7 +20,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:padding="@dimen/keyline_margin"> + android:padding="@dimen/keyline_margin" + app:fitsSystemWindowsInsets="top|bottom"> + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="bottom" /> + android:paddingBottom="8dp" + app:fitsSystemWindowsInsets="bottom" /> @@ -56,7 +58,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:paddingRight="@dimen/corner_fab_margin" - android:paddingBottom="@dimen/corner_fab_margin"> + android:paddingBottom="@dimen/corner_fab_margin" + app:fitsSystemWindowsInsets="bottom"> + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="top|bottom" /> + android:layout_marginVertical="@dimen/gallery_search_bar_margin_v" + app:layout_fitsSystemWindowsInsets="top|bottom" /> + android:paddingBottom="@dimen/corner_fab_margin" + app:fitsSystemWindowsInsets="top|bottom"> + android:clipToPadding="false" + app:fitsSystemWindowsInsets="bottom" /> @@ -41,7 +42,8 @@ android:layout_gravity="center" android:drawablePadding="8dp" android:gravity="center_horizontal" - android:text="@string/no_one_comments_gallery" /> + android:text="@string/no_one_comments_gallery" + app:fitsSystemWindowsInsets="bottom" /> + android:visibility="invisible" + app:fitsSystemWindowsInsets="bottom"> + android:paddingBottom="@dimen/corner_fab_margin" + app:fitsSystemWindowsInsets="bottom"> + android:layout_gravity="center" + app:fitsSystemWindowsInsets="top|bottom" /> + android:gravity="center_horizontal" + app:fitsSystemWindowsInsets="top|bottom" /> diff --git a/app/src/main/res/layout/scene_gallery_info.xml b/app/src/main/res/layout/scene_gallery_info.xml index b39fd7058..5ea92d450 100644 --- a/app/src/main/res/layout/scene_gallery_info.xml +++ b/app/src/main/res/layout/scene_gallery_info.xml @@ -15,6 +15,8 @@ --> + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="bottom" /> diff --git a/app/src/main/res/layout/scene_gallery_list.xml b/app/src/main/res/layout/scene_gallery_list.xml index 8f9eecac2..f33ae554a 100644 --- a/app/src/main/res/layout/scene_gallery_list.xml +++ b/app/src/main/res/layout/scene_gallery_list.xml @@ -24,12 +24,14 @@ + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="top|bottom" /> + android:layout_height="match_parent" + app:layout_fitsSystemWindowsInsets="top|bottom" /> + android:layout_marginVertical="@dimen/gallery_search_bar_margin_v" + app:layout_fitsSystemWindowsInsets="top|bottom" /> + android:paddingBottom="@dimen/corner_fab_margin" + app:fitsSystemWindowsInsets="top|bottom"> + android:paddingBottom="@dimen/corner_fab_margin" + app:fitsSystemWindowsInsets="top|bottom"> + android:clipToPadding="false" + app:fitsSystemWindowsInsets="bottom" /> diff --git a/app/src/main/res/layout/scene_history.xml b/app/src/main/res/layout/scene_history.xml index a26874972..09df602ed 100644 --- a/app/src/main/res/layout/scene_history.xml +++ b/app/src/main/res/layout/scene_history.xml @@ -15,6 +15,7 @@ --> @@ -26,7 +27,8 @@ + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="bottom" /> + android:paddingBottom="8dp" + app:fitsSystemWindowsInsets="bottom" /> @@ -48,6 +51,7 @@ android:layout_gravity="center" android:drawablePadding="16dp" android:gravity="center_horizontal" - android:text="@string/no_history" /> + android:text="@string/no_history" + app:fitsSystemWindowsInsets="bottom" /> diff --git a/app/src/main/res/layout/scene_login.xml b/app/src/main/res/layout/scene_login.xml index 02414852a..3eb363f60 100644 --- a/app/src/main/res/layout/scene_login.xml +++ b/app/src/main/res/layout/scene_login.xml @@ -18,7 +18,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical"> + android:orientation="vertical" + app:fitsSystemWindowsInsets="top|bottom"> + android:layout_height="match_parent" + app:fitsSystemWindowsInsets="top|bottom"> + android:paddingTop="@dimen/keyline_margin" + app:fitsSystemWindowsInsets="top|bottom"> + android:paddingTop="@dimen/keyline_margin" + app:fitsSystemWindowsInsets="top|bottom"> SOCKS + + @string/dark_theme_follow_system + @string/dark_theme_off + @string/dark_theme_on + + -1 1 diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index f74287473..0cc71b491 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -41,6 +41,7 @@