[app] Nuke non-md2 themes
This commit is contained in:
parent
e39c99844b
commit
1e22764695
|
|
@ -16,7 +16,6 @@ import androidx.annotation.StringRes;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.appcompat.widget.SearchView;
|
import androidx.appcompat.widget.SearchView;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
|
@ -59,12 +58,8 @@ public class AppListActivity extends BaseActivity {
|
||||||
binding.recyclerView.setAdapter(scopeAdapter);
|
binding.recyclerView.setAdapter(scopeAdapter);
|
||||||
binding.recyclerView.setHasFixedSize(true);
|
binding.recyclerView.setHasFixedSize(true);
|
||||||
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
||||||
|
RecyclerViewKt.addFastScroller(binding.recyclerView, binding.recyclerView);
|
||||||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||||
if (!preferences.getBoolean("md2", true)) {
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this,
|
|
||||||
DividerItemDecoration.VERTICAL);
|
|
||||||
binding.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
}
|
|
||||||
|
|
||||||
searchListener = new SearchView.OnQueryTextListener() {
|
searchListener = new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@ import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.Window;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
@ -67,8 +70,7 @@ public class BaseActivity extends MaterialActivity {
|
||||||
|
|
||||||
@StyleRes
|
@StyleRes
|
||||||
private int getCustomTheme() {
|
private int getCustomTheme() {
|
||||||
String baseThemeName = preferences.getBoolean("colorized_action_bar", false) && !preferences.getBoolean("md2", true) ?
|
String baseThemeName = "ThemeOverlay";
|
||||||
"ThemeOverlay.ActionBarPrimaryColor" : "ThemeOverlay";
|
|
||||||
String customThemeName;
|
String customThemeName;
|
||||||
String primaryColorEntryName = "colorPrimary";
|
String primaryColorEntryName = "colorPrimary";
|
||||||
for (CustomThemeColor color : CustomThemeColors.Primary.values()) {
|
for (CustomThemeColor color : CustomThemeColors.Primary.values()) {
|
||||||
|
|
@ -91,7 +93,7 @@ public class BaseActivity extends MaterialActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
theme = getTheme(this) + getCustomTheme() + preferences.getBoolean("md2", true);
|
theme = getTheme(this) + getCustomTheme();
|
||||||
|
|
||||||
// make sure the versions are consistent
|
// make sure the versions are consistent
|
||||||
String coreVersionStr = Constants.getXposedVersion();
|
String coreVersionStr = Constants.getXposedVersion();
|
||||||
|
|
@ -121,8 +123,7 @@ public class BaseActivity extends MaterialActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
getWindow().setStatusBarColor(0);
|
if (!Objects.equals(theme, getTheme(this) + getCustomTheme())) {
|
||||||
if (!Objects.equals(theme, getTheme(this) + getCustomTheme() + preferences.getBoolean("md2", true))) {
|
|
||||||
recreate();
|
recreate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -141,14 +142,30 @@ public class BaseActivity extends MaterialActivity {
|
||||||
theme.applyStyle(resid, false);
|
theme.applyStyle(resid, false);
|
||||||
}
|
}
|
||||||
theme.applyStyle(getCustomTheme(), true);
|
theme.applyStyle(getCustomTheme(), true);
|
||||||
if (preferences.getBoolean("md2", true) && !(this instanceof MainActivity)) {
|
|
||||||
theme.applyStyle(R.style.ThemeOverlay_Md2, true);
|
|
||||||
}
|
|
||||||
if (this instanceof MainActivity) {
|
|
||||||
theme.applyStyle(R.style.ThemeOverlay_ActivityMain, true);
|
|
||||||
}
|
|
||||||
theme.applyStyle(getThemeStyleRes(this), true);
|
theme.applyStyle(getThemeStyleRes(this), true);
|
||||||
// only pass theme style to super, so styled theme will not be overwritten
|
// only pass theme style to super, so styled theme will not be overwritten
|
||||||
super.onApplyThemeResource(theme, R.style.ThemeOverlay, first);
|
super.onApplyThemeResource(theme, R.style.ThemeOverlay, first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onApplyTranslucentSystemBars() {
|
||||||
|
super.onApplyTranslucentSystemBars();
|
||||||
|
Window window = getWindow();
|
||||||
|
window.setStatusBarColor(Color.TRANSPARENT);
|
||||||
|
|
||||||
|
window.getDecorView().post(() -> {
|
||||||
|
if (window.getDecorView().getRootWindowInsets().getSystemWindowInsetBottom() >= Resources.getSystem().getDisplayMetrics().density * 40) {
|
||||||
|
window.setNavigationBarColor(getThemedColor(android.R.attr.navigationBarColor) & 0x00ffffff | -0x20000000);
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
|
window.setNavigationBarContrastEnforced(false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
window.setNavigationBarColor(Color.TRANSPARENT);
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||||
|
window.setNavigationBarContrastEnforced(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.widget.SearchView;
|
import androidx.appcompat.widget.SearchView;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.bumptech.glide.request.target.CustomTarget;
|
import com.bumptech.glide.request.target.CustomTarget;
|
||||||
|
|
@ -83,14 +82,8 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
|
||||||
binding.recyclerView.setAdapter(adapter);
|
binding.recyclerView.setAdapter(adapter);
|
||||||
binding.recyclerView.setHasFixedSize(true);
|
binding.recyclerView.setHasFixedSize(true);
|
||||||
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
||||||
//RecyclerViewKt.addFastScroller(binding.recyclerView, binding.swipeRefreshLayout);
|
RecyclerViewKt.addFastScroller(binding.recyclerView, binding.recyclerView);
|
||||||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||||
if (!preferences.getBoolean("md2", true)) {
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this,
|
|
||||||
DividerItemDecoration.VERTICAL);
|
|
||||||
binding.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
}
|
|
||||||
//binding.swipeRefreshLayout.setOnRefreshListener(() -> adapter.refresh(true));
|
|
||||||
mSearchListener = new SearchView.OnQueryTextListener() {
|
mSearchListener = new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String query) {
|
public boolean onQueryTextSubmit(String query) {
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.widget.SearchView;
|
import androidx.appcompat.widget.SearchView;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -76,12 +75,8 @@ public class RepoActivity extends BaseActivity implements RepoLoader.Listener {
|
||||||
binding.recyclerView.setAdapter(adapter);
|
binding.recyclerView.setAdapter(adapter);
|
||||||
binding.recyclerView.setHasFixedSize(true);
|
binding.recyclerView.setHasFixedSize(true);
|
||||||
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
binding.recyclerView.setLayoutManager(new LinearLayoutManagerFix(this));
|
||||||
|
RecyclerViewKt.addFastScroller(binding.recyclerView, binding.recyclerView);
|
||||||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||||
if (!preferences.getBoolean("md2", true)) {
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this,
|
|
||||||
DividerItemDecoration.VERTICAL);
|
|
||||||
binding.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
}
|
|
||||||
repoLoader.addListener(this);
|
repoLoader.addListener(this);
|
||||||
searchListener = new SearchView.OnQueryTextListener() {
|
searchListener = new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
|
|
||||||
|
|
@ -317,10 +316,6 @@ public class RepoItemActivity extends BaseActivity {
|
||||||
case 2:
|
case 2:
|
||||||
holder.recyclerView.setAdapter(position == 1 ? new ReleaseAdapter(module.getReleases()) : new InformationAdapter(module));
|
holder.recyclerView.setAdapter(position == 1 ? new ReleaseAdapter(module.getReleases()) : new InformationAdapter(module));
|
||||||
holder.recyclerView.setLayoutManager(new LinearLayoutManagerFix(RepoItemActivity.this));
|
holder.recyclerView.setLayoutManager(new LinearLayoutManagerFix(RepoItemActivity.this));
|
||||||
if (!preferences.getBoolean("md2", true)) {
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(RepoItemActivity.this, DividerItemDecoration.VERTICAL);
|
|
||||||
holder.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
}
|
|
||||||
holder.recyclerView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> binding.appBar.setRaised(!top));
|
holder.recyclerView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> binding.appBar.setRaised(!top));
|
||||||
RecyclerViewKt.fixEdgeEffect(holder.recyclerView, false, true);
|
RecyclerViewKt.fixEdgeEffect(holder.recyclerView, false, true);
|
||||||
RecyclerViewKt.addFastScroller(holder.recyclerView, holder.itemView);
|
RecyclerViewKt.addFastScroller(holder.recyclerView, holder.itemView);
|
||||||
|
|
|
||||||
|
|
@ -262,22 +262,6 @@ public class SettingsActivity extends BaseActivity {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
SwitchPreference transparent = findPreference("transparent_status_bar");
|
|
||||||
if (transparent != null) {
|
|
||||||
transparent.setOnPreferenceChangeListener((preference, newValue) -> {
|
|
||||||
boolean enabled = (Boolean) newValue;
|
|
||||||
SettingsActivity activity = (SettingsActivity) getActivity();
|
|
||||||
if (activity != null) {
|
|
||||||
if (enabled) {
|
|
||||||
activity.getWindow().setStatusBarColor(activity.getThemedColor(R.attr.colorActionBar));
|
|
||||||
} else {
|
|
||||||
activity.getWindow().setStatusBarColor(activity.getThemedColor(R.attr.colorPrimaryDark));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
IntegerListPreference theme = findPreference("theme");
|
IntegerListPreference theme = findPreference("theme");
|
||||||
if (theme != null) {
|
if (theme != null) {
|
||||||
theme.setOnPreferenceChangeListener((preference, newValue) -> {
|
theme.setOnPreferenceChangeListener((preference, newValue) -> {
|
||||||
|
|
@ -324,41 +308,6 @@ public class SettingsActivity extends BaseActivity {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Preference colorized_action_bar = findPreference("colorized_action_bar");
|
|
||||||
if (colorized_action_bar != null) {
|
|
||||||
colorized_action_bar.setOnPreferenceChangeListener((preference, newValue) -> {
|
|
||||||
SettingsActivity activity = (SettingsActivity) getActivity();
|
|
||||||
if (activity != null && !(isBlackNightTheme() && isNightMode(getResources().getConfiguration()))) {
|
|
||||||
activity.restart();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
SwitchPreference md2 = findPreference("md2");
|
|
||||||
if (md2 != null) {
|
|
||||||
md2.setOnPreferenceChangeListener((preference, newValue) -> {
|
|
||||||
SettingsActivity activity = (SettingsActivity) getActivity();
|
|
||||||
if (activity != null) {
|
|
||||||
updatePreference(!md2.isChecked());
|
|
||||||
activity.restart();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
updatePreference(!md2.isChecked());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updatePreference(boolean show) {
|
|
||||||
Preference transparent_status_bar = findPreference("transparent_status_bar");
|
|
||||||
if (transparent_status_bar != null) {
|
|
||||||
transparent_status_bar.setVisible(show);
|
|
||||||
}
|
|
||||||
Preference colorized_action_bar = findPreference("colorized_action_bar");
|
|
||||||
if (colorized_action_bar != null) {
|
|
||||||
colorized_action_bar.setVisible(show);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class OnFlagChangeListener implements Preference.OnPreferenceChangeListener {
|
private class OnFlagChangeListener implements Preference.OnPreferenceChangeListener {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public final class NavUtil {
|
||||||
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
|
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
|
||||||
customTabsIntent.setShowTitle(true);
|
customTabsIntent.setShowTitle(true);
|
||||||
CustomTabColorSchemeParams params = new CustomTabColorSchemeParams.Builder()
|
CustomTabColorSchemeParams params = new CustomTabColorSchemeParams.Builder()
|
||||||
.setToolbarColor(activity.getThemedColor(R.attr.colorActionBar))
|
.setToolbarColor(activity.getThemedColor(R.attr.toolbarColor))
|
||||||
.setNavigationBarColor(activity.getThemedColor(android.R.attr.navigationBarColor))
|
.setNavigationBarColor(activity.getThemedColor(android.R.attr.navigationBarColor))
|
||||||
.setNavigationBarDividerColor(0)
|
.setNavigationBarDividerColor(0)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
android:left="8dp"
|
android:left="8dp"
|
||||||
android:top="4dp">
|
android:top="4dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="@color/selectorTransparency_md2" />
|
<solid android:color="@color/selectorTransparency" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:color="?colorControlHighlight"
|
|
||||||
tools:ignore="PrivateResource">
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@android:id/mask"
|
|
||||||
android:bottom="4dp"
|
|
||||||
android:end="8dp"
|
|
||||||
android:left="8dp"
|
|
||||||
android:top="4dp">
|
|
||||||
<shape android:shape="rectangle">
|
|
||||||
<solid android:color="@android:color/white" />
|
|
||||||
<corners android:radius="8dp" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</ripple>
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
@ -33,7 +32,7 @@
|
||||||
android:id="@+id/sliding_tabs"
|
android:id="@+id/sliding_tabs"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/tab_layout_height"
|
android:layout_height="@dimen/tab_layout_height"
|
||||||
android:background="?colorActionBar"
|
android:background="@android:color/transparent"
|
||||||
app:tabMode="fixed"
|
app:tabMode="fixed"
|
||||||
style="?tabLayoutTheme">
|
style="?tabLayoutTheme">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?actionBarSize"
|
android:layout_height="?actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
@ -51,7 +50,7 @@
|
||||||
android:id="@+id/tab_layout"
|
android:id="@+id/tab_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/tab_layout_height"
|
android:layout_height="@dimen/tab_layout_height"
|
||||||
android:background="?colorActionBar"
|
android:background="@android:color/transparent"
|
||||||
style="?tabLayoutTheme" />
|
style="?tabLayoutTheme" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</rikka.material.widget.AppBarLayout>
|
</rikka.material.widget.AppBarLayout>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?colorActionBar"
|
|
||||||
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
|
||||||
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title"
|
||||||
app:popupTheme="?actionBarPopupTheme" />
|
app:popupTheme="?actionBarPopupTheme" />
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
<color name="colorBackground">#303030</color>
|
<color name="colorBackground">#303030</color>
|
||||||
<color name="colorPrimaryDark">#2E2E2E</color>
|
<color name="colorPrimaryDark">#2E2E2E</color>
|
||||||
<color name="colorActionBar">#383838</color>
|
<color name="colorActionBar">#383838</color>
|
||||||
|
<color name="selectorTransparency">#cbffffff</color>
|
||||||
<color name="navigationBarColor">#B3000000</color>
|
<color name="navigationBarColor">#B3000000</color>
|
||||||
<color name="colorError">@color/material_red_700</color>
|
<color name="colorError">@color/material_red_700</color>
|
||||||
<color name="colorNormal">@color/material_green_700</color>
|
<color name="colorNormal">@color/material_green_700</color>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="selectorTransparency_md2">#cbffffff</color>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,18 +1,3 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
<style name="AppTheme" parent="Theme"/>
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Dark" />
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.Md2">
|
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
|
||||||
<item name="colorActionBar">@color/colorPrimaryDark</item>
|
|
||||||
<item name="android:colorBackground">@color/colorPrimaryDark</item>
|
|
||||||
<item name="android:windowBackground">@color/colorPrimaryDark</item>
|
|
||||||
<item name="listItemBackground">@drawable/item_background_md2</item>
|
|
||||||
<item name="roundBackground">@drawable/item_background_md2</item>
|
|
||||||
<item name="liftOnScroll">true</item>
|
|
||||||
<item name="switchBarStyle">@style/Widget.SwitchBar</item>
|
|
||||||
<item name="switchBarTheme">@style/ThemeOverlay.SwitchBar</item>
|
|
||||||
<item name="switchBarBackgroundNormal">@color/switchbar_background_dark</item>
|
|
||||||
<item name="switchBarBackgroundDisabled">@color/switchbar_background_dark</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<attr name="colorActionBar" format="color" />
|
|
||||||
<attr name="listItemBackground" format="reference" />
|
<attr name="listItemBackground" format="reference" />
|
||||||
<attr name="roundBackground" format="reference" />
|
<attr name="roundBackground" format="reference" />
|
||||||
<attr name="actionBarTheme" format="reference" />
|
<attr name="actionBarTheme" format="reference" />
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">@color/material_blue_700</color>
|
<color name="colorPrimary">@color/material_blue_700</color>
|
||||||
<color name="colorBackground">#fafafa</color>
|
<color name="colorBackground">#fff</color>
|
||||||
<color name="colorPrimaryDark">#dddddd</color>
|
<color name="colorPrimaryDark">#fff</color>
|
||||||
<color name="colorAccent">#e91e63</color>
|
<color name="colorAccent">@color/material_blue_700</color>
|
||||||
<color name="colorActionBar">#F0F0F0</color>
|
<color name="colorActionBar">#fff</color>
|
||||||
|
<color name="selectorTransparency">#34ffffff</color>
|
||||||
<color name="navigationBarColor">@color/colorPrimary</color>
|
<color name="navigationBarColor">@color/colorPrimary</color>
|
||||||
<color name="navigationBarColorBlack">@android:color/black</color>
|
<color name="navigationBarColorBlack">@android:color/black</color>
|
||||||
<color name="colorError">@color/material_red_500</color>
|
<color name="colorError">@color/material_red_500</color>
|
||||||
<color name="colorNormal">@color/material_green_500</color>
|
<color name="colorNormal">@color/material_green_500</color>
|
||||||
<color name="colorInstall">@color/material_blue_500</color>
|
<color name="colorInstall">@color/material_blue_500</color>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="colorPrimary_md2">@color/material_blue_700</color>
|
|
||||||
<color name="colorBackground_md2">#fff</color>
|
|
||||||
<color name="colorPrimaryDark_md2">#fff</color>
|
|
||||||
<color name="colorAccent_md2">@color/material_blue_700</color>
|
|
||||||
<color name="colorActionBar_md2">#fff</color>
|
|
||||||
<color name="selectorTransparency_md2">#34ffffff</color>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,35 +1,53 @@
|
||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<style name="AppTheme" parent="Theme.Light" />
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="Base.AppTheme.Light" parent="Theme.Material.Light.LightStatusBar">
|
||||||
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
|
<item name="listItemBackground">@drawable/item_background</item>
|
||||||
|
<item name="roundBackground">@drawable/item_background</item>
|
||||||
|
|
||||||
|
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
|
||||||
|
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
|
||||||
|
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
|
||||||
|
|
||||||
|
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
|
||||||
|
|
||||||
|
<item name="android:windowActionBar">false</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Base.AppTheme" parent="Theme.Material">
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
<item name="colorActionBar">@color/colorActionBar</item>
|
|
||||||
<item name="android:colorBackground">@color/colorBackground</item>
|
<item name="listItemBackground">@drawable/item_background</item>
|
||||||
<item name="android:windowBackground">@color/colorBackground</item>
|
<item name="roundBackground">@drawable/item_background</item>
|
||||||
<item name="listItemBackground">?selectableItemBackground</item>
|
|
||||||
<item name="roundBackground">@drawable/item_background_round</item>
|
|
||||||
<item name="actionBarPopupTheme">@style/AppTheme.PopupOverlay</item>
|
|
||||||
<item name="android:windowLightStatusBar">@bool/lightSystemUI</item>
|
|
||||||
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/lightSystemUI
|
|
||||||
</item>
|
|
||||||
<item name="android:navigationBarColor">@color/navigationBarColor</item>
|
|
||||||
<item name="alertDialogTheme">@style/ThemeOverlay.MaterialComponents.MaterialAlertDialog
|
|
||||||
</item>
|
|
||||||
<item name="tabLayoutTheme">@style/Widget.MaterialComponents.TabLayout</item>
|
|
||||||
<item name="liftOnScroll">false</item>
|
|
||||||
<item name="switchBarStyle">@style/Widget.SwitchBar.Light</item>
|
|
||||||
<item name="switchBarTheme">@style/ThemeOverlay.SwitchBar</item>
|
|
||||||
<item name="switchBarBackgroundNormal">@color/switchbar_background_light</item>
|
|
||||||
<item name="switchBarBackgroundDisabled">@color/switchbar_background_light</item>
|
|
||||||
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
|
<item name="actionBarStyle">@style/Widget.Material.ActionBar.Surface</item>
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
|
<item name="actionBarTheme">@style/ThemeOverlay.ActionBar</item>
|
||||||
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
|
<item name="toolbarStyle">@style/Widget.Material.Toolbar</item>
|
||||||
|
|
||||||
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
|
<item name="appBarStyle">@style/Widget.AppBar.Surface.Raisable</item>
|
||||||
|
|
||||||
|
<item name="android:windowActionBar">false</item>
|
||||||
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
<item name="windowActionBar">false</item>
|
||||||
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Light" parent="Base.AppTheme.Light" />
|
||||||
|
|
||||||
|
<style name="Theme" parent="Base.AppTheme" />
|
||||||
|
|
||||||
<style name="Widget.AppBar" parent="">
|
<style name="Widget.AppBar" parent="">
|
||||||
<item name="android:background">?toolbarColor</item>
|
<item name="android:background">?toolbarColor</item>
|
||||||
<item name="android:theme">?actionBarTheme</item>
|
<item name="android:theme">?actionBarTheme</item>
|
||||||
|
|
@ -75,34 +93,10 @@
|
||||||
<item name="useMaterialThemeColors">true</item>
|
<item name="useMaterialThemeColors">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light" />
|
|
||||||
|
|
||||||
<style name="ThemeOverlay" />
|
<style name="ThemeOverlay" />
|
||||||
|
|
||||||
<style name="ThemeOverlay.Md2">
|
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark_md2</item>
|
|
||||||
<item name="colorActionBar">@color/colorActionBar_md2</item>
|
|
||||||
<item name="android:colorBackground">@color/colorBackground_md2</item>
|
|
||||||
<item name="android:windowBackground">@color/colorBackground_md2</item>
|
|
||||||
<item name="listItemBackground">@drawable/item_background_md2</item>
|
|
||||||
<item name="roundBackground">@drawable/item_background_md2</item>
|
|
||||||
<item name="liftOnScroll">true</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.ActionBarPrimaryColor">
|
|
||||||
<item name="actionBarTheme">@style/ThemeOverlay.MaterialComponents.Dark.ActionBar</item>
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
|
||||||
<item name="tabLayoutTheme">@style/Widget.MaterialComponents.TabLayout.Colored</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.ActivityMain">
|
|
||||||
<item name="android:windowLightStatusBar">@bool/lightSystemUI</item>
|
|
||||||
<item name="colorPrimaryDark">?android:colorBackground</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.Black">
|
<style name="ThemeOverlay.Black">
|
||||||
<item name="colorPrimaryDark">@android:color/black</item>
|
<item name="colorPrimaryDark">@android:color/black</item>
|
||||||
<item name="colorActionBar">@android:color/black</item>
|
|
||||||
<item name="android:navigationBarColor">@color/navigationBarColorBlack</item>
|
<item name="android:navigationBarColor">@color/navigationBarColorBlack</item>
|
||||||
<item name="android:colorBackground">@android:color/black</item>
|
<item name="android:colorBackground">@android:color/black</item>
|
||||||
<item name="android:windowBackground">@android:color/black</item>
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -38,19 +38,6 @@
|
||||||
android:summary="%s"
|
android:summary="%s"
|
||||||
android:title="@string/settings_theme"
|
android:title="@string/settings_theme"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
<SwitchPreference
|
|
||||||
android:key="md2"
|
|
||||||
android:title="@string/material_design_2"
|
|
||||||
android:defaultValue="true"
|
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
<SwitchPreference
|
|
||||||
android:key="colorized_action_bar"
|
|
||||||
android:title="@string/colorized_action_bar"
|
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
<SwitchPreference
|
|
||||||
android:key="transparent_status_bar"
|
|
||||||
android:title="@string/transparent_status_bar"
|
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="black_dark_theme"
|
android:key="black_dark_theme"
|
||||||
android:title="@string/pure_black_dark_theme"
|
android:title="@string/pure_black_dark_theme"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue