This commit is contained in:
Thomas 2022-12-01 18:26:46 +01:00
parent e1e5284a47
commit 774a73c624
17 changed files with 486 additions and 68 deletions

View File

@ -288,15 +288,15 @@
android:name=".activities.InstanceActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/action_about_instance"
android:theme="@style/AlertDialog" />
android:theme="@style/AppThemeAlertDialog" />
<activity
android:name=".activities.InstanceProfileActivity"
android:excludeFromRecents="true"
android:theme="@style/AlertDialog" />
android:theme="@style/AppThemeAlertDialog" />
<activity
android:name=".activities.ProxyActivity"
android:excludeFromRecents="true"
android:theme="@style/AlertDialog" />
android:theme="@style/AppThemeAlertDialog" />
<activity
android:name=".activities.HashTagActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
@ -306,12 +306,12 @@
<activity
android:name=".activities.MediaActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/TransparentDark" />
android:theme="@style/Transparent" />
<activity
android:name=".activities.InstanceHealthActivity"
android:excludeFromRecents="true"
android:theme="@style/AlertDialog" />
android:theme="@style/AppThemeAlertDialog" />
<activity
android:name=".activities.ReportActivity"

View File

@ -16,8 +16,10 @@ package app.fedilab.android.activities;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
@ -102,8 +104,20 @@ public class BaseActivity extends AppCompatActivity {
}
}
super.onCreate(savedInstanceState);
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
}
Helper.setLocale(this);
}
@Override
protected void attachBaseContext(Context newBase) {
if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {
final Configuration override = new Configuration(newBase.getResources().getConfiguration());
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(newBase);
override.fontScale = prefs.getFloat(newBase.getString(R.string.SET_FONT_SCALE), 1.1f);
applyOverrideConfiguration(override);
}
super.attachBaseContext(newBase);
}
}

View File

@ -0,0 +1,123 @@
package app.fedilab.android.activities;
/* Copyright 2021 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.preference.PreferenceManager;
import com.vanniktech.emoji.EmojiManager;
import com.vanniktech.emoji.one.EmojiOneProvider;
import app.fedilab.android.R;
import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.ThemeHelper;
@SuppressLint("Registered")
public class BaseAlertDialogActivity extends AppCompatActivity {
static {
Helper.installProvider();
EmojiManager.install(new EmojiOneProvider());
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this);
String currentTheme = sharedpreferences.getString(getString(R.string.SET_THEME_BASE), getString(R.string.SET_DEFAULT_THEME));
//Default automatic switch
if (currentTheme.equals(getString(R.string.SET_DEFAULT_THEME))) {
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_NO:
String defaultLight = sharedpreferences.getString(getString(R.string.SET_THEME_DEFAULT_LIGHT), "LIGHT");
switch (defaultLight) {
case "LIGHT":
setTheme(R.style.AppThemeAlertDialog);
break;
case "SOLARIZED_LIGHT":
setTheme(R.style.SolarizedAlertDialog);
break;
}
break;
case Configuration.UI_MODE_NIGHT_YES:
String defaultDark = sharedpreferences.getString(getString(R.string.SET_THEME_DEFAULT_DARK), "DARK");
switch (defaultDark) {
case "DARK":
setTheme(R.style.AppThemeAlertDialog);
break;
case "SOLARIZED_DARK":
setTheme(R.style.SolarizedAlertDialog);
break;
case "BLACK":
setTheme(R.style.BlackAlertDialog);
break;
}
break;
}
} else {
switch (currentTheme) {
case "LIGHT":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
setTheme(R.style.AppThemeAlertDialog);
break;
case "DARK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.AppThemeAlertDialog);
break;
case "SOLARIZED_LIGHT":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
setTheme(R.style.SolarizedAlertDialog);
break;
case "SOLARIZED_DARK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.SolarizedAlertDialog);
break;
case "BLACK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.BlackAlertDialog);
break;
}
}
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
}
Helper.setLocale(this);
}
@Override
protected void attachBaseContext(Context newBase) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {
final Configuration override = new Configuration(newBase.getResources().getConfiguration());
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(newBase);
override.fontScale = prefs.getFloat(newBase.getString(R.string.SET_FONT_SCALE), 1.1f);
applyOverrideConfiguration(override);
}
super.attachBaseContext(newBase);
}
}

View File

@ -16,8 +16,10 @@ package app.fedilab.android.activities;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
@ -102,8 +104,23 @@ public class BaseBarActivity extends AppCompatActivity {
}
}
super.onCreate(savedInstanceState);
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
}
Helper.setLocale(this);
}
@Override
protected void attachBaseContext(Context newBase) {
if (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {
final Configuration override = new Configuration(newBase.getResources().getConfiguration());
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(newBase);
override.fontScale = prefs.getFloat(newBase.getString(R.string.SET_FONT_SCALE), 1.1f);
applyOverrideConfiguration(override);
}
super.attachBaseContext(newBase);
}
}

View File

@ -0,0 +1,126 @@
package app.fedilab.android.activities;
/* Copyright 2022 Thomas Schneider
*
* This file is a part of Fedilab
*
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with Fedilab; if not,
* see <http://www.gnu.org/licenses>. */
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.preference.PreferenceManager;
import com.vanniktech.emoji.EmojiManager;
import com.vanniktech.emoji.one.EmojiOneProvider;
import app.fedilab.android.R;
import app.fedilab.android.helper.Helper;
import app.fedilab.android.helper.ThemeHelper;
@SuppressLint("Registered")
public class BaseTransparentActivity extends AppCompatActivity {
static {
Helper.installProvider();
EmojiManager.install(new EmojiOneProvider());
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this);
String currentTheme = sharedpreferences.getString(getString(R.string.SET_THEME_BASE), getString(R.string.SET_DEFAULT_THEME));
//Default automatic switch
if (currentTheme.equals(getString(R.string.SET_DEFAULT_THEME))) {
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_NO:
String defaultLight = sharedpreferences.getString(getString(R.string.SET_THEME_DEFAULT_LIGHT), "LIGHT");
switch (defaultLight) {
case "LIGHT":
setTheme(R.style.Transparent);
break;
case "SOLARIZED_LIGHT":
setTheme(R.style.TransparentSolarized);
break;
}
break;
case Configuration.UI_MODE_NIGHT_YES:
String defaultDark = sharedpreferences.getString(getString(R.string.SET_THEME_DEFAULT_DARK), "DARK");
switch (defaultDark) {
case "DARK":
setTheme(R.style.Transparent);
break;
case "SOLARIZED_DARK":
setTheme(R.style.TransparentSolarized);
break;
case "BLACK":
setTheme(R.style.TransparentBlack);
break;
}
break;
}
} else {
switch (currentTheme) {
case "LIGHT":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
setTheme(R.style.Transparent);
break;
case "DARK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.Transparent);
break;
case "SOLARIZED_LIGHT":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
setTheme(R.style.TransparentSolarized);
break;
case "SOLARIZED_DARK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.TransparentSolarized);
break;
case "BLACK":
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
setTheme(R.style.TransparentBlack);
break;
}
}
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
}
Helper.setLocale(this);
}
@Override
protected void attachBaseContext(Context newBase) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {
final Configuration override = new Configuration(newBase.getResources().getConfiguration());
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(newBase);
override.fontScale = prefs.getFloat(newBase.getString(R.string.SET_FONT_SCALE), 1.1f);
applyOverrideConfiguration(override);
}
super.attachBaseContext(newBase);
}
}

View File

@ -48,7 +48,7 @@ import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.viewmodel.mastodon.InstancesVM;
public class InstanceActivity extends BaseActivity {
public class InstanceActivity extends BaseAlertDialogActivity {
ActivityInstanceBinding binding;

View File

@ -37,7 +37,7 @@ import app.fedilab.android.helper.ThemeHelper;
import app.fedilab.android.viewmodel.mastodon.InstanceSocialVM;
public class InstanceHealthActivity extends BaseActivity {
public class InstanceHealthActivity extends BaseAlertDialogActivity {
private ActivityInstanceSocialBinding binding;

View File

@ -31,7 +31,7 @@ import app.fedilab.android.helper.Helper;
import app.fedilab.android.viewmodel.mastodon.NodeInfoVM;
import es.dmoral.toasty.Toasty;
public class InstanceProfileActivity extends BaseActivity {
public class InstanceProfileActivity extends BaseAlertDialogActivity {
private String instance;

View File

@ -68,7 +68,7 @@ import app.fedilab.android.ui.fragment.media.FragmentMedia;
import es.dmoral.toasty.Toasty;
public class MediaActivity extends BaseActivity implements OnDownloadInterface {
public class MediaActivity extends BaseTransparentActivity implements OnDownloadInterface {
int flags;
private ArrayList<Attachment> attachments;

View File

@ -29,7 +29,7 @@ import app.fedilab.android.R;
import app.fedilab.android.databinding.ActivityProxyBinding;
public class ProxyActivity extends BaseActivity {
public class ProxyActivity extends BaseAlertDialogActivity {
private ActivityProxyBinding binding;
private int position;

View File

@ -63,6 +63,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
if (SET_THEME_BASE != null) {
ThemeHelper.switchTo(SET_THEME_BASE.getValue());
requireActivity().recreate();
Helper.recreateMainActivity(requireActivity());
}
}
//TODO: check if can be removed

View File

@ -210,16 +210,15 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
if (initialStatuses != null) {
initializeStatusesCommonView(initialStatuses);
} else {
router(null);
}
} else {
if (isNotPinnedTimeline && lockForResumeCall == 0) {
router(null);
lockForResumeCall++;
} else if (!isNotPinnedTimeline) {
} /*else if (!isNotPinnedTimeline) {
router(null);
}
}*/
}
if (timelineStatuses != null && timelineStatuses.size() > 0) {
route(DIRECTION.FETCH_NEW, true);

View File

@ -28,9 +28,7 @@
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<item name="android:isLightTheme" tools:targetApi="q">false</item>
@ -40,16 +38,13 @@
<item name="android:windowEnterTransition">@android:transition/explode</item>
<item name="android:windowExitTransition">@android:transition/explode</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform
<item name="android:windowSharedElementEnterTransition">@transition/change_image_transform
</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform
<item name="android:windowSharedElementExitTransition">@transition/change_image_transform
</item>
</style>
<style name="AppThemeBar" parent="Theme.Material3.Dark">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
@ -76,30 +71,43 @@
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<item name="android:isLightTheme" tools:targetApi="q">false</item>
</style>
<style name="TransparentDark" parent="Theme.Material3.Dark">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<item name="android:isLightTheme" tools:targetApi="q">false</item>
<style name="AppThemeAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_dark_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_dark_error</item>
<item name="colorOnError">@color/md_theme_dark_onError</item>
<item name="colorErrorContainer">@color/md_theme_dark_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_dark_onErrorContainer</item>
<item name="colorOutline">@color/md_theme_dark_outline</item>
<item name="android:colorBackground">@color/md_theme_dark_background</item>
<item name="colorOnBackground">@color/md_theme_dark_onBackground</item>
<item name="colorSurface">@color/md_theme_dark_surface</item>
<item name="colorOnSurface">@color/md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_dark_onSurfaceVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_dark_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_dark_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_dark_inversePrimary</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
</style>
<style name="AlertDialog" parent="Theme.Material3.Dark.Dialog.Alert" />
<style name="SolarizedAppTheme" parent="AppTheme">
<item name="colorPrimary">@color/solarized_md_theme_dark_primary</item>
@ -167,23 +175,61 @@
<item name="colorPrimaryInverse">@color/solarized_md_theme_dark_inversePrimary</item>
</style>
<style name="BlackAppTheme" parent="AppTheme">
<style name="TransparentSolarized" parent="SolarizedAppThemeBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="SolarizedAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
<item name="colorPrimary">@color/solarized_md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/solarized_md_theme_dark_onPrimary</item>
<item name="colorPrimaryContainer">@color/solarized_md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/solarized_md_theme_dark_onPrimaryContainer
</item>
<item name="colorSecondary">@color/solarized_md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/solarized_md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/solarized_md_theme_dark_secondaryContainer
</item>
<item name="colorOnSecondaryContainer">@color/solarized_md_theme_dark_onSecondaryContainer
</item>
<item name="colorTertiary">@color/solarized_md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/solarized_md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/solarized_md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/solarized_md_theme_dark_onTertiaryContainer
</item>
<item name="colorError">@color/solarized_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/solarized_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/solarized_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/solarized_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/solarized_md_theme_dark_background</item>
<item name="colorOnBackground">@color/solarized_md_theme_dark_onBackground</item>
<item name="colorSurface">@color/solarized_md_theme_dark_surface</item>
<item name="colorOnSurface">@color/solarized_md_theme_dark_onSurface</item>
<item name="colorSurfaceVariant">@color/solarized_md_theme_dark_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/solarized_md_theme_dark_onSurfaceVariant</item>
<item name="colorOutline">@color/solarized_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/solarized_md_theme_dark_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/solarized_md_theme_dark_inverseSurface</item>
<item name="colorPrimaryInverse">@color/solarized_md_theme_dark_inversePrimary</item>
</style>
<style name="BlackAppTheme" parent="AppTheme">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/white</item>
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/solarized_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/solarized_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/solarized_md_theme_dark_onError</item>
@ -201,22 +247,56 @@
</style>
<style name="BlackAppThemeBar" parent="AppThemeBar">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/white</item>
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/solarized_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/solarized_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/solarized_md_theme_dark_onError</item>
<item name="colorOnErrorContainer">@color/solarized_md_theme_dark_onErrorContainer</item>
<item name="android:colorBackground">@color/black</item>
<item name="colorOnBackground">@color/white</item>
<item name="colorSurface">@color/black</item>
<item name="colorOnSurface">@color/white</item>
<item name="colorSurfaceVariant">@color/black</item>
<item name="colorOnSurfaceVariant">@color/white</item>
<item name="colorOutline">@color/solarized_md_theme_dark_outline</item>
<item name="colorOnSurfaceInverse">@color/black</item>
<item name="colorSurfaceInverse">@color/white</item>
<item name="colorPrimaryInverse">@color/black</item>
</style>
<style name="TransparentBlack" parent="BlackAppThemeBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="BlackAlertDialog" parent="Theme.Material3.Dark.Dialog.Alert">
<item name="colorPrimary">@color/md_theme_dark_primary</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorPrimaryContainer">@color/md_theme_dark_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/white</item>
<item name="colorSecondary">@color/md_theme_dark_secondary</item>
<item name="colorOnSecondary">@color/md_theme_dark_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_dark_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_dark_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_dark_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_dark_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_dark_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_dark_onTertiaryContainer</item>
<item name="colorError">@color/solarized_md_theme_dark_error</item>
<item name="colorErrorContainer">@color/solarized_md_theme_dark_errorContainer</item>
<item name="colorOnError">@color/solarized_md_theme_dark_onError</item>

View File

@ -180,9 +180,9 @@
<color name="solarized_md_theme_dark_errorContainer">#93000A</color>
<color name="solarized_md_theme_dark_onError">#690005</color>
<color name="solarized_md_theme_dark_onErrorContainer">#FFDAD6</color>
<color name="solarized_md_theme_dark_background">#1C1C17</color>
<color name="solarized_md_theme_dark_background">#002b36</color>
<color name="solarized_md_theme_dark_onBackground">#E5E2DA</color>
<color name="solarized_md_theme_dark_surface">#1C1C17</color>
<color name="solarized_md_theme_dark_surface">#073642</color>
<color name="solarized_md_theme_dark_onSurface">#E5E2DA</color>
<color name="solarized_md_theme_dark_surfaceVariant">#46483B</color>
<color name="solarized_md_theme_dark_onSurfaceVariant">#C7C7B7</color>

View File

@ -27,23 +27,18 @@
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
<item name="android:isLightTheme" tools:targetApi="q">true</item>
<item name="windowNoTitle">true</item>
<!-- specify enter and exit transitions -->
<item name="android:windowEnterTransition">@android:transition/explode</item>
<item name="android:windowExitTransition">@android:transition/explode</item>
<!-- specify shared element transitions -->
<item name="android:windowSharedElementEnterTransition">
@transition/change_image_transform
<item name="android:windowSharedElementEnterTransition">@transition/change_image_transform
</item>
<item name="android:windowSharedElementExitTransition">
@transition/change_image_transform
<item name="android:windowSharedElementExitTransition">@transition/change_image_transform
</item>
</style>
@ -75,28 +70,50 @@
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
<item name="android:isLightTheme" tools:targetApi="q">true</item>
</style>
<style name="TransparentDark" parent="Theme.Material3.Dark">
<style name="Transparent" parent="AppThemeBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:statusBarColor">?attr/background</item>
<item name="android:navigationBarColor">?attr/background</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
<item name="android:isLightTheme" tools:targetApi="q">true</item>
</style>
<style name="AlertDialog" parent="Theme.Material3.Light.Dialog.Alert" />
<style name="AppThemeAlertDialog" parent="Theme.Material3.Light.Dialog.Alert">
<item name="colorPrimary">@color/md_theme_light_primary</item>
<item name="colorOnPrimary">@color/md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_light_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_light_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_light_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_light_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_light_error</item>
<item name="colorOnError">@color/md_theme_light_onError</item>
<item name="colorErrorContainer">@color/md_theme_light_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_light_onErrorContainer</item>
<item name="colorOutline">@color/md_theme_light_outline</item>
<item name="android:colorBackground">@color/md_theme_light_background</item>
<item name="colorOnBackground">@color/md_theme_light_onBackground</item>
<item name="colorSurface">@color/md_theme_light_surface</item>
<item name="colorOnSurface">@color/md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_light_onSurfaceVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_light_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_light_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_light_inversePrimary</item>
<item name="android:navigationBarColor">?android:colorBackground</item>
</style>
<style name="SolarizedAppTheme" parent="AppTheme">
<item name="colorPrimary">@color/solarized_md_theme_light_primary</item>
@ -132,8 +149,49 @@
<item name="colorPrimaryInverse">@color/solarized_md_theme_light_inversePrimary</item>
</style>
<style name="SolarizedAppThemeBar" parent="AppThemeBar">
<style name="TransparentSolarized" parent="SolarizedAppThemeBar">
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
</style>
<style name="SolarizedAlertDialog" parent="Theme.Material3.Light.Dialog.Alert">
<item name="colorPrimary">@color/solarized_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/solarized_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/solarized_md_theme_light_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/solarized_md_theme_light_onPrimaryContainer
</item>
<item name="colorSecondary">@color/solarized_md_theme_light_secondary</item>
<item name="colorOnSecondary">@color/solarized_md_theme_light_onSecondary</item>
<item name="colorSecondaryContainer">@color/solarized_md_theme_light_secondaryContainer
</item>
<item name="colorOnSecondaryContainer">
@color/solarized_md_theme_light_onSecondaryContainer
</item>
<item name="colorTertiary">@color/solarized_md_theme_light_tertiary</item>
<item name="colorOnTertiary">@color/solarized_md_theme_light_onTertiary</item>
<item name="colorTertiaryContainer">@color/solarized_md_theme_light_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/solarized_md_theme_light_onTertiaryContainer
</item>
<item name="colorError">@color/solarized_md_theme_light_error</item>
<item name="colorErrorContainer">@color/solarized_md_theme_light_errorContainer</item>
<item name="colorOnError">@color/solarized_md_theme_light_onError</item>
<item name="colorOnErrorContainer">@color/solarized_md_theme_light_onErrorContainer</item>
<item name="android:colorBackground">@color/solarized_md_theme_light_background</item>
<item name="colorOnBackground">@color/solarized_md_theme_light_onBackground</item>
<item name="colorSurface">@color/solarized_md_theme_light_surface</item>
<item name="colorOnSurface">@color/solarized_md_theme_light_onSurface</item>
<item name="colorSurfaceVariant">@color/solarized_md_theme_light_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/solarized_md_theme_light_onSurfaceVariant</item>
<item name="colorOutline">@color/solarized_md_theme_light_outline</item>
<item name="colorOnSurfaceInverse">@color/solarized_md_theme_light_inverseOnSurface</item>
<item name="colorSurfaceInverse">@color/solarized_md_theme_light_inverseSurface</item>
<item name="colorPrimaryInverse">@color/solarized_md_theme_light_inversePrimary</item>
</style>
<style name="SolarizedAppThemeBar" parent="AppThemeBar">
<item name="colorPrimary">@color/solarized_md_theme_light_primary</item>
<item name="colorOnPrimary">@color/solarized_md_theme_light_onPrimary</item>
<item name="colorPrimaryContainer">@color/solarized_md_theme_light_primaryContainer</item>

View File

@ -41,7 +41,7 @@
app:entryValues="@array/SET_THEME_DEFAULT_DARK"
app:iconSpaceReserved="false"
app:key="@string/SET_THEME_DEFAULT_DARK"
app:title="@string/type_of_theme"
app:title="@string/type_default_theme_dark"
app:useSimpleSummaryProvider="true" />
</androidx.preference.PreferenceScreen>

View File

@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.1"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files