Fix landscape even more, make blur disabled by default (new strings)

pull/85/head
Fox2Code 2 years ago
parent 6f7c40393e
commit cd5f6b6e6a

@ -3,12 +3,15 @@ package com.fox2code.mmm;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.SearchView;
import androidx.cardview.widget.CardView;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
@ -47,6 +50,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
private int overScrollInsetBottom;
private TextView actionBarPadding;
private BlurView actionBarBlur;
private ColorDrawable actionBarBackground;
private RecyclerView moduleList;
private CardView searchCard;
private SearchView searchView;
@ -81,6 +85,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
}
this.actionBarPadding = findViewById(R.id.action_bar_padding);
this.actionBarBlur = findViewById(R.id.action_bar_blur);
this.actionBarBackground = new ColorDrawable(Color.TRANSPARENT);
this.progressIndicator = findViewById(R.id.progress_bar);
this.swipeRefreshLayout = findViewById(R.id.swipe_refresh);
this.swipeRefreshLayoutOrigStartOffset =
@ -97,11 +102,13 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
this.moduleList.setItemViewCacheSize(4); // Default is 2
OverScrollManager.install(this.moduleList, this);
this.swipeRefreshLayout.setOnRefreshListener(this);
this.actionBarBlur.setBackground(this.actionBarBackground);
this.actionBarBlur.setupWith(this.moduleList).setFrameClearDrawable(
this.getWindow().getDecorView().getBackground())
.setBlurAlgorithm(new RenderScriptBlur(this))
.setBlurRadius(5F).setBlurAutoUpdate(true)
.setHasFixedTransformationMatrix(true);
this.updateBlurState();
this.moduleList.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
@ -223,6 +230,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
private void updateScreenInsets(Configuration configuration) {
boolean landscape = configuration.orientation ==
Configuration.ORIENTATION_LANDSCAPE;
int bottomInset = (landscape ? 0 : this.getNavigationBarHeight());
int statusBarHeight = getStatusBarHeight();
int actionBarHeight = getActionBarHeight();
int combinedBarsHeight = statusBarHeight + actionBarHeight;
@ -231,7 +239,6 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
swipeRefreshLayoutOrigStartOffset + combinedBarsHeight,
swipeRefreshLayoutOrigEndOffset + combinedBarsHeight);
this.moduleViewListBuilder.setHeaderPx(actionBarHeight);
int bottomInset = (landscape ? 0 : this.getNavigationBarHeight());
this.moduleViewListBuilder.setFooterPx(
bottomInset + this.searchCard.getHeight());
this.moduleViewListBuilder.updateInsets();
@ -240,6 +247,26 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
this.overScrollInsetBottom = bottomInset;
}
private void updateBlurState() {
if (MainApplication.isBlurEnabled()) {
this.actionBarBlur.setBlurEnabled(true);
int transparent = this.getColorCompat(R.color.transparent);
this.actionBarBackground.setColor(transparent);
} else {
this.actionBarBlur.setBlurEnabled(false);
boolean isLightMode = this.isLightTheme();
int colorOpaque;
try {
colorOpaque = this.getColorCompat(
android.R.attr.windowBackground);
} catch (Resources.NotFoundException e) {
colorOpaque = this.getColorCompat(isLightMode ?
R.color.white : R.color.black);
}
this.actionBarBackground.setColor(colorOpaque);
}
}
@Override
public void refreshUI() {
super.refreshUI();
@ -251,6 +278,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
this.searchView.setIconified(true);
this.cardIconifyUpdate();
this.updateScreenInsets();
this.updateBlurState();
this.moduleViewListBuilder.setQuery(null);
Log.i(TAG, "Item After");
this.moduleViewListBuilder.refreshNotificationsUI(this.moduleViewAdapter);

@ -7,6 +7,7 @@ import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Build;
import android.os.SystemClock;
import android.text.SpannableStringBuilder;
import android.util.Log;
@ -18,6 +19,7 @@ import androidx.emoji2.text.EmojiCompat;
import androidx.emoji2.text.FontRequestEmojiCompatConfig;
import com.fox2code.mmm.compat.CompatActivity;
import com.fox2code.mmm.compat.CompatApplication;
import com.fox2code.mmm.compat.CompatThemeWrapper;
import com.fox2code.mmm.installer.InstallerInitializer;
import com.fox2code.mmm.utils.GMSProviderInstaller;
@ -44,7 +46,7 @@ import io.noties.prism4j.annotations.PrismBundle;
includeAll = true,
grammarLocatorClassName = ".Prism4jGrammarLocator"
)
public class MainApplication extends Application implements CompatActivity.ApplicationCallbacks {
public class MainApplication extends CompatApplication {
private static final String timeFormatString = "dd MMM yyyy"; // Example: 13 july 2001
private static Locale timeFormatLocale =
Resources.getSystem().getConfiguration().locale;
@ -110,6 +112,11 @@ public class MainApplication extends Application implements CompatActivity.Appli
return getSharedPreferences().getBoolean("pref_dns_over_https", true);
}
public static boolean isBlurEnabled() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
getSharedPreferences().getBoolean("pref_enable_blur", false);
}
public static boolean isDeveloper() {
return BuildConfig.DEBUG ||
getSharedPreferences().getBoolean("developer", false);
@ -164,7 +171,6 @@ public class MainApplication extends Application implements CompatActivity.Appli
@StyleRes
private int managerThemeResId = R.style.Theme_MagiskModuleManager;
private Boolean nightModeOverride = null;
private CompatThemeWrapper markwonThemeContext;
private Markwon markwon;
@ -217,20 +223,7 @@ public class MainApplication extends Application implements CompatActivity.Appli
@SuppressLint("NonConstantResourceId")
public void setManagerThemeResId(@StyleRes int resId) {
this.managerThemeResId = resId;
switch (this.managerThemeResId) {
case R.style.Theme_MagiskModuleManager:
this.nightModeOverride = null;
break;
case R.style.Theme_MagiskModuleManager_Light:
this.nightModeOverride = Boolean.FALSE;
break;
case R.style.Theme_MagiskModuleManager_Dark:
this.nightModeOverride = Boolean.TRUE;
break;
default:
}
if (this.markwonThemeContext != null) {
this.markwonThemeContext.setNightModeOverride(this.nightModeOverride);
this.markwonThemeContext.setTheme(resId);
}
this.markwon = null;
@ -317,15 +310,15 @@ public class MainApplication extends Application implements CompatActivity.Appli
@Override
public void onCreateCompatActivity(CompatActivity compatActivity) {
compatActivity.setNightModeOverride(this.nightModeOverride);
compatActivity.setForceEnglish(isForceEnglish());
this.setForceEnglish(isForceEnglish());
super.onCreateCompatActivity(compatActivity);
compatActivity.setTheme(this.managerThemeResId);
}
@Override
public void onRefreshUI(CompatActivity compatActivity) {
compatActivity.setNightModeOverride(this.nightModeOverride);
compatActivity.setForceEnglish(isForceEnglish());
this.setForceEnglish(isForceEnglish());
super.onRefreshUI(compatActivity);
compatActivity.setThemeRecreate(this.managerThemeResId);
}

@ -105,6 +105,7 @@ public class AndroidacyActivity extends CompatActivity {
webSettings.setUserAgentString(Http.getAndroidacyUA());
webSettings.setDomStorageEnabled(true);
webSettings.setJavaScriptEnabled(true);
webSettings.setAllowFileAccess(false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { // Make website follow app theme
webSettings.setForceDark(MainApplication.getINSTANCE().isLightTheme() ?
WebSettings.FORCE_DARK_OFF : WebSettings.FORCE_DARK_ON);

@ -6,6 +6,8 @@ import android.util.Log;
import android.webkit.JavascriptInterface;
import android.widget.Toast;
import androidx.annotation.Keep;
import com.fox2code.mmm.BuildConfig;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.installer.InstallerInitializer;
@ -20,6 +22,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@Keep
public class AndroidacyWebAPI {
private static final String TAG = "AndroidacyWebAPI";
private final AndroidacyActivity activity;
@ -106,7 +109,9 @@ public class AndroidacyWebAPI {
return;
}
if (checksum != null) checksum = checksum.trim();
if (!Hashes.checkSumValid(checksum)) {
if (checksum == null || checksum.isEmpty()) {
Log.w(TAG, "Androidacy WebView didn't provided a checksum!");
} else if (!Hashes.checkSumValid(checksum)) {
this.forceQuitRaw("Androidacy didn't provided a valid checksum");
return;
}

@ -11,11 +11,15 @@ import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.util.TypedValue;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.AttrRes;
import androidx.annotation.CallSuper;
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.Dimension;
import androidx.annotation.DrawableRes;
import androidx.annotation.NonNull;
@ -24,12 +28,15 @@ import androidx.annotation.Px;
import androidx.annotation.StringRes;
import androidx.annotation.StyleRes;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import androidx.core.view.WindowInsetsCompat;
import androidx.fragment.app.Fragment;
import com.fox2code.mmm.Constants;
import com.fox2code.mmm.R;
import java.lang.ref.WeakReference;
import java.util.Locale;
import java.util.Objects;
@ -51,6 +58,7 @@ public class CompatActivity extends AppCompatActivity {
}
};
final WeakReference<CompatActivity> selfReference;
private final CompatConfigHelper compatConfigHelper = new CompatConfigHelper(this);
private CompatActivity.OnActivityResultCallback onActivityResultCallback;
private CompatActivity.OnBackPressedCallback onBackPressedCallback;
@ -65,6 +73,10 @@ public class CompatActivity extends AppCompatActivity {
private boolean forceEnglish;
private Boolean nightModeOverride;
public CompatActivity() {
this.selfReference = new WeakReference<>(this);
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
if (!this.onCreateCalled) {
@ -326,7 +338,7 @@ public class CompatActivity extends AppCompatActivity {
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
this.compatConfigHelper.checkResourcesOverrides(this.getTheme(),
this.compatConfigHelper.checkResourcesOverrides(newConfig,
this.forceEnglish, this.nightModeOverride);
super.onConfigurationChanged(newConfig);
}
@ -409,11 +421,51 @@ public class CompatActivity extends AppCompatActivity {
this.checkResourcesOverrides(this.forceEnglish, nightModeOverride);
}
void propagateResourcesOverride(boolean forceEnglish, Boolean nightModeOverride) {
if (this.forceEnglish == forceEnglish &&
this.nightModeOverride == nightModeOverride) return;
this.forceEnglish = forceEnglish;
this.nightModeOverride = nightModeOverride;
this.checkResourcesOverrides(forceEnglish, nightModeOverride);
}
private void checkResourcesOverrides(boolean forceEnglish,Boolean nightModeOverride) {
if (this.isRefreshUi || !this.onCreateCalled) return; // Wait before reload
this.compatConfigHelper.checkResourcesOverrides(forceEnglish, nightModeOverride);
}
public boolean isLightTheme() {
Resources.Theme theme = this.getTheme();
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data != 0;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
theme.resolveAttribute(android.R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data != 0;
}
}
theme.resolveAttribute(android.R.attr.background, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return ColorUtils.calculateLuminance(typedValue.data) > 0.7D;
}
throw new IllegalStateException("Theme is not a valid theme!");
}
@ColorInt
public final int getColorCompat(@ColorRes @AttrRes int color) {
TypedValue typedValue = new TypedValue();
this.getTheme().resolveAttribute(color, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return typedValue.data;
}
return ContextCompat.getColor(this, color);
}
public Locale getUserLocale() {
return this.compatConfigHelper.getUserLocale();
}
@ -435,6 +487,10 @@ public class CompatActivity extends AppCompatActivity {
return (CompatActivity) context;
}
public WeakReference<CompatActivity> asWeakReference() {
return this.selfReference;
}
@FunctionalInterface
public interface OnActivityResultCallback {
void onActivityResult(int resultCode, @Nullable Intent data);

@ -0,0 +1,144 @@
package com.fox2code.mmm.compat;
import android.app.Application;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import android.util.TypedValue;
import androidx.annotation.AttrRes;
import androidx.annotation.CallSuper;
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.core.graphics.ColorUtils;
import com.fox2code.mmm.R;
import java.lang.ref.WeakReference;
/**
* I will probably outsource this to a separate library later
*/
public class CompatApplication extends Application implements CompatActivity.ApplicationCallbacks {
private static final String TAG = "CompatApplication";
private final CompatConfigHelper compatConfigHelper = new CompatConfigHelper(this);
private WeakReference<CompatActivity> lastCompatActivity;
// CompatConfigHelper
private boolean forceEnglish;
private Boolean nightModeOverride;
private boolean propagateOverrides;
public CompatApplication() {}
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
this.compatConfigHelper.checkResourcesOverrides(newConfig,
this.forceEnglish, this.nightModeOverride);
super.onConfigurationChanged(newConfig);
}
public void setForceEnglish(boolean forceEnglish) {
if (this.forceEnglish != forceEnglish) {
this.forceEnglish = forceEnglish;
this.checkResourcesOverrides(forceEnglish, this.nightModeOverride);
}
// Propagate even if local value didn't changed
if (this.propagateOverrides && this.lastCompatActivity != null) {
CompatActivity compatActivity = this.lastCompatActivity.get();
if (compatActivity != null)
compatActivity.setForceEnglish(forceEnglish);
}
}
public void setNightModeOverride(Boolean nightModeOverride) {
if (this.nightModeOverride != nightModeOverride) {
this.nightModeOverride = nightModeOverride;
this.checkResourcesOverrides(this.forceEnglish, nightModeOverride);
}
// Propagate even if local value didn't changed
if (this.propagateOverrides && this.lastCompatActivity != null) {
CompatActivity compatActivity = this.lastCompatActivity.get();
if (compatActivity != null)
compatActivity.setNightModeOverride(nightModeOverride);
}
}
public boolean isPropagateOverrides() {
return propagateOverrides;
}
public void setPropagateOverrides(boolean propagateOverrides) {
this.propagateOverrides = propagateOverrides;
WeakReference<CompatActivity> lastCompatActivity = this.lastCompatActivity;
if (lastCompatActivity != null) {
Log.d(TAG, "setPropagateOverrides(" + // This should be avoided
propagateOverrides + ") called after first activity created!");
CompatActivity compatActivity = lastCompatActivity.get();
if (compatActivity != null && propagateOverrides) {
this.propagateOverrides(compatActivity);
}
}
}
private void checkResourcesOverrides(boolean forceEnglish, Boolean nightModeOverride) {
this.compatConfigHelper.checkResourcesOverrides(forceEnglish, nightModeOverride);
}
public boolean isLightTheme() {
Resources.Theme theme = this.getTheme();
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data == 1;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
theme.resolveAttribute(android.R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data == 1;
}
}
theme.resolveAttribute(android.R.attr.background, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return ColorUtils.calculateLuminance(typedValue.data) > 0.7D;
}
throw new IllegalStateException("Theme is not a valid theme!");
}
@ColorInt
public final int getColorCompat(@ColorRes @AttrRes int color) {
TypedValue typedValue = new TypedValue();
this.getTheme().resolveAttribute(color, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return typedValue.data;
}
return ContextCompat.getColor(this, color);
}
@Override
@CallSuper
public void onCreateCompatActivity(CompatActivity compatActivity) {
this.lastCompatActivity = compatActivity.selfReference;
if (this.propagateOverrides) {
this.propagateOverrides(compatActivity);
}
}
@Override
@CallSuper
public void onRefreshUI(CompatActivity compatActivity) {
this.lastCompatActivity = compatActivity.selfReference;
if (this.propagateOverrides) {
this.propagateOverrides(compatActivity);
}
}
private void propagateOverrides(CompatActivity compatActivity) {
compatActivity.propagateResourcesOverride(
this.forceEnglish, this.nightModeOverride);
}
}

@ -2,9 +2,20 @@ package com.fox2code.mmm.compat;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Build;
import android.util.TypedValue;
import androidx.annotation.AttrRes;
import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.StyleRes;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ComplexColorCompat;
import androidx.core.graphics.ColorUtils;
import com.fox2code.mmm.R;
/**
* I will probably outsource this to a separate library later
@ -52,4 +63,36 @@ public class CompatThemeWrapper extends ContextThemeWrapper {
if (!this.canReload) return; // Do not reload during theme reload
this.compatConfigHelper.checkResourcesOverrides(forceEnglish, nightModeOverride);
}
public boolean isLightTheme() {
Resources.Theme theme = this.getTheme();
TypedValue typedValue = new TypedValue();
theme.resolveAttribute(R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data == 1;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
theme.resolveAttribute(android.R.attr.isLightTheme, typedValue, true);
if (typedValue.type == TypedValue.TYPE_INT_BOOLEAN) {
return typedValue.data == 1;
}
}
theme.resolveAttribute(android.R.attr.background, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return ColorUtils.calculateLuminance(typedValue.data) > 0.7D;
}
throw new IllegalStateException("Theme is not a valid theme!");
}
@ColorInt
public final int getColorCompat(@ColorRes @AttrRes int color) {
TypedValue typedValue = new TypedValue();
this.getTheme().resolveAttribute(color, typedValue, true);
if (typedValue.type >= TypedValue.TYPE_FIRST_COLOR_INT &&
typedValue.type <= TypedValue.TYPE_LAST_COLOR_INT) {
return typedValue.data;
}
return ContextCompat.getColor(this, color);
}
}

@ -112,6 +112,9 @@ public class InstallerActivity extends CompatActivity {
.setBackground(new ColorDrawable(background));
this.progressIndicator.setVisibility(View.GONE);
this.progressIndicator.setIndeterminate(true);
this.getWindow().setFlags( // Note: Doesn't require WAKELOCK permission
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
if (urlMode) {
this.progressIndicator.setVisibility(View.VISIBLE);
this.installerTerminal.addLine("- Downloading " + name);
@ -516,6 +519,7 @@ public class InstallerActivity extends CompatActivity {
else toDelete = null;
} else toDelete = null;
this.runOnUiThread(() -> {
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON, 0);
this.setOnBackPressedCallback(null);
this.setDisplayHomeAsUpEnabled(true);
this.progressIndicator.setVisibility(View.GONE);

@ -1,17 +1,15 @@
package com.fox2code.mmm.settings;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.recyclerview.widget.RecyclerView;
import com.fox2code.mmm.AppUpdateManager;
import com.fox2code.mmm.BuildConfig;
@ -27,8 +25,6 @@ import com.fox2code.mmm.repo.RepoManager;
import com.fox2code.mmm.utils.Http;
import com.fox2code.mmm.utils.IntentHelper;
import com.mikepenz.aboutlibraries.LibsBuilder;
import com.mikepenz.aboutlibraries.LibsConfiguration;
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment;
import com.topjohnwu.superuser.internal.UiThreadHandler;
public class SettingsActivity extends CompatActivity {
@ -79,6 +75,11 @@ public class SettingsActivity extends CompatActivity {
}, 1);
return true;
});
Preference enableBlur = findPreference("pref_enable_blur");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
enableBlur.setSummary(R.string.require_android_6);
enableBlur.setEnabled(false);
}
Preference forceEnglish = findPreference("pref_force_english");
forceEnglish.setOnPreferenceChangeListener((preference, newValue) -> {
CompatThemeWrapper compatThemeWrapper =

@ -0,0 +1,8 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path android:fillColor="@android:color/white" android:pathData="M6,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM6,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM3,9.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM6,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,10.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM14,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM14,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM3,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,3.5c0.28,0 0.5,-0.22 0.5,-0.5s-0.22,-0.5 -0.5,-0.5 -0.5,0.22 -0.5,0.5 0.22,0.5 0.5,0.5zM10,7c0.55,0 1,-0.45 1,-1s-0.45,-1 -1,-1 -1,0.45 -1,1 0.45,1 1,1zM10,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM18,13c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,9c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM18,5c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM21,13.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM14,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,20.5c-0.28,0 -0.5,0.22 -0.5,0.5s0.22,0.5 0.5,0.5 0.5,-0.22 0.5,-0.5 -0.22,-0.5 -0.5,-0.5zM10,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM10,17c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1zM14,12.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5zM14,8.5c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5 1.5,-0.67 1.5,-1.5 -0.67,-1.5 -1.5,-1.5z"/>
</vector>

@ -2,8 +2,11 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
app:fitsSystemWindowsInsets="left|right"
tools:context=".installer.InstallerActivity">
<HorizontalScrollView
android:layout_height="match_parent"

@ -2,8 +2,11 @@
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
app:fitsSystemWindowsInsets="left|right"
tools:context=".installer.InstallerActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/install_terminal"

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/markdownBackground"
app:fitsSystemWindowsInsets="top">
app:fitsSystemWindowsInsets="top|left|right">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/markdownView"
android:text="@string/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</ScrollView>

@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
app:fitsSystemWindowsInsets="left|right">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"

@ -1,4 +1,5 @@
<resources>
<!-- If translating, please remove "theme_values" -->
<string-array name="theme_values" translatable="false">
<item>system</item>
<item>dark</item>

@ -7,8 +7,8 @@
<color name="teal_700">#FF018786</color>
<color name="orange_700">#EF6C00</color>
<color name="orange_200">#FFA726</color>
<color name="black_transparent">#80000000</color>
<color name="white_transparent">#80FFFFFF</color>
<color name="black_transparent">#70000000</color>
<color name="white_transparent">#70FFFFFF</color>
<color name="transparent">#00000000</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>

@ -22,6 +22,7 @@
<string name="support">Support</string>
<string name="donate">Donate</string>
<string name="submit_modules">Submit a module</string>
<string name="require_android_6">Require Android 6.0+</string>
<!-- Module section translation -->
<string name="module_last_update">Last update:</string>
@ -50,6 +51,7 @@
<string name="master_delete_yes">Delete files</string>
<string name="master_delete_fail">Failed to delete the module files</string>
<string name="theme_pref">Theme</string>
<string name="theme_mode_pref">Theme mode</string>
<string name="module_id_prefix">Module id: </string>
<string name="install_from_storage">Install module from storage</string>
<string name="invalid_format">The selected module is in an invalid format</string>
@ -88,6 +90,7 @@
Wrap text to a new line instead of putting
all text on the same line when installing a module
</string>
<string name="enable_blur_pref">Enable blur</string>
<string name="repo_enabled">Repo enabled</string>
<string name="repo_disabled">Repo disabled</string>
</resources>

@ -13,7 +13,9 @@
<item name="colorOnSecondary">@color/white</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>
@ -40,7 +42,9 @@
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">false</item>
<!-- Customize your theme here. -->
<item name="android:windowActivityTransitions">true</item>
<!-- <item name="android:activityOpenEnterAnimation">@*android:anim/slide_in_right</item>

@ -17,6 +17,13 @@
app:entryValues="@array/theme_values"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_enable_blur"
app:icon="@drawable/ic_baseline_blur_on_24"
app:title="@string/enable_blur_pref"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_force_english"

Loading…
Cancel
Save