Rework cards, Initial Android 12 Monet support

pull/145/head
DerGoogler 2 years ago
parent 5119726c5d
commit a766c73af1

@ -88,7 +88,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.google.android.material:material:1.6.0'
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
implementation "dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0"
implementation "dev.rikka.rikkax.insets:insets:1.2.0"

@ -32,6 +32,8 @@ import com.fox2code.mmm.repo.RepoManager;
import com.fox2code.mmm.settings.SettingsActivity;
import com.fox2code.mmm.utils.Http;
import com.fox2code.mmm.utils.IntentHelper;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.MaterialToolbar;
import com.google.android.material.progressindicator.LinearProgressIndicator;
import eightbitlab.com.blurview.BlurView;
@ -68,10 +70,10 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
protected void onCreate(Bundle savedInstanceState) {
this.initMode = true;
super.onCreate(savedInstanceState);
this.setActionBarExtraMenuButton(R.drawable.ic_baseline_settings_24, v -> {
this.setActionBarExtraMenuButton(R.drawable.ic_baseline_settings_24, v -> {
IntentHelper.startActivity(this, SettingsActivity.class);
return true;
}, R.string.pref_category_settings);
return true;
}, R.string.pref_category_settings);
setContentView(R.layout.activity_main);
this.setTitle(R.string.app_name);
this.getWindow().setFlags(
@ -103,13 +105,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.setBackground(this.actionBarBackground);;
this.actionBarBlur.setupWith(this.moduleList).setFrameClearDrawable(
this.getWindow().getDecorView().getBackground())
.setBlurAlgorithm(new RenderScriptBlur(this))
.setBlurRadius(4F).setBlurAutoUpdate(true)
.setHasFixedTransformationMatrix(true);
this.updateBlurState();
.setBlurAlgorithm(new RenderScriptBlur(this))
.setBlurRadius(4F).setBlurAutoUpdate(true)
.setHasFixedTransformationMatrix(true);
this.updateBlurState();
this.moduleList.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
@ -255,7 +257,7 @@ public class MainActivity extends CompatActivity implements SwipeRefreshLayout.O
bottomInset + this.searchCard.getHeight());
this.searchCard.setRadius(this.searchCard.getHeight() / 2F);
this.moduleViewListBuilder.updateInsets();
this.actionBarBlur.invalidate();
//this.actionBarBlur.invalidate();
this.overScrollInsetTop = combinedBarsHeight;
this.overScrollInsetBottom = bottomInset;
Log.d(TAG, "( " + bottomInset + ", " +

@ -23,6 +23,7 @@ import com.fox2code.mmm.compat.CompatThemeWrapper;
import com.fox2code.mmm.installer.InstallerInitializer;
import com.fox2code.mmm.utils.GMSProviderInstaller;
import com.fox2code.mmm.utils.Http;
import com.google.android.material.color.DynamicColors;
import com.topjohnwu.superuser.Shell;
import java.text.SimpleDateFormat;
@ -280,6 +281,9 @@ public class MainApplication extends CompatApplication {
@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
DynamicColors.applyToActivitiesIfAvailable(this);
}
SharedPreferences sharedPreferences = MainApplication.getSharedPreferences();
// We are only one process so it's ok to do this
SharedPreferences bootPrefs = MainApplication.bootSharedPreferences =

@ -10,6 +10,7 @@ import android.widget.Toast;
import androidx.annotation.DrawableRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import com.fox2code.mmm.MainApplication;
import com.fox2code.mmm.R;
@ -22,14 +23,21 @@ import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.manager.ModuleManager;
import com.fox2code.mmm.module.ModuleHolder;
import com.fox2code.mmm.utils.IntentHelper;
import com.google.android.material.chip.Chip;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import io.noties.markwon.Markwon;
public enum ActionButtonType {
INFO(R.drawable.ic_baseline_info_24) {
INFO() {
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void update(Chip button, ModuleHolder moduleHolder) {
button.setChipIcon(button.getContext().getResources().getDrawable(R.drawable.ic_baseline_info_24));
button.setText("Description");
}
@Override
public void doAction(Chip button, ModuleHolder moduleHolder) {
String notesUrl = moduleHolder.repoModule.notesUrl;
if (notesUrl.startsWith("https://api.androidacy.com/magisk/readme/?module=") ||
notesUrl.startsWith("https://www.androidacy.com/")) {
@ -46,31 +54,36 @@ public enum ActionButtonType {
}
@Override
public boolean doActionLong(ImageButton button, ModuleHolder moduleHolder) {
public boolean doActionLong(Chip button, ModuleHolder moduleHolder) {
Context context = button.getContext();
Toast.makeText(context, context.getString(R.string.module_id_prefix) +
moduleHolder.moduleId, Toast.LENGTH_SHORT).show();
moduleHolder.moduleId, Toast.LENGTH_SHORT).show();
return true;
}
},
UPDATE_INSTALL() {
@Override
public void update(ImageButton button, ModuleHolder moduleHolder) {
public void update(Chip button, ModuleHolder moduleHolder) {
int icon = moduleHolder.hasUpdate() ?
R.drawable.ic_baseline_update_24 :
R.drawable.ic_baseline_system_update_24;
button.setImageResource(icon);
button.setChipIcon(button.getContext().getResources().getDrawable(icon));
if (moduleHolder.hasUpdate()) {
button.setText("Update");
} else {
button.setText("Install");
}
}
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void doAction(Chip button, ModuleHolder moduleHolder) {
ModuleInfo moduleInfo = moduleHolder.getMainModuleInfo();
if (moduleInfo == null) return;
String updateZipUrl = moduleHolder.getUpdateZipUrl();
if (updateZipUrl == null) return;
// Androidacy manage the selection between download and install
if (updateZipUrl.startsWith("https://www.androidacy.com/") ||
updateZipUrl.startsWith("https://api.androidacy.com/magisk/info/?module=")) {
updateZipUrl.startsWith("https://api.androidacy.com/magisk/info/?module=")) {
IntentHelper.openUrlAndroidacy(
button.getContext(), updateZipUrl, true,
moduleInfo.name, moduleInfo.config);
@ -127,18 +140,19 @@ public enum ActionButtonType {
},
UNINSTALL() {
@Override
public void update(ImageButton button, ModuleHolder moduleHolder) {
public void update(Chip button, ModuleHolder moduleHolder) {
int icon = moduleHolder.hasFlag(ModuleInfo.FLAG_MODULE_UNINSTALLING) ?
R.drawable.ic_baseline_delete_outline_24 : (
!moduleHolder.hasFlag(ModuleInfo.FLAG_MODULE_UPDATING) ||
moduleHolder.hasFlag(ModuleInfo.FLAGS_MODULE_ACTIVE)) ?
R.drawable.ic_baseline_delete_24 :
R.drawable.ic_baseline_delete_forever_24;
button.setImageResource(icon);
moduleHolder.hasFlag(ModuleInfo.FLAGS_MODULE_ACTIVE)) ?
R.drawable.ic_baseline_delete_24 :
R.drawable.ic_baseline_delete_forever_24;
button.setChipIcon(button.getContext().getResources().getDrawable(icon));
button.setText("Uninstall");
}
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void doAction(Chip button, ModuleHolder moduleHolder) {
if (!moduleHolder.hasFlag(ModuleInfo.FLAGS_MODULE_ACTIVE |
ModuleInfo.FLAG_MODULE_UNINSTALLING) &&
moduleHolder.hasFlag(ModuleInfo.FLAG_MODULE_UPDATING)) {
@ -153,7 +167,7 @@ public enum ActionButtonType {
}
@Override
public boolean doActionLong(ImageButton button, ModuleHolder moduleHolder) {
public boolean doActionLong(Chip button, ModuleHolder moduleHolder) {
// We can't trust active flag on first boot
if (moduleHolder.moduleInfo.hasFlag(ModuleInfo.FLAGS_MODULE_ACTIVE)) return false;
new AlertDialog.Builder(button.getContext()).setTitle(R.string.master_delete)
@ -165,13 +179,20 @@ public enum ActionButtonType {
moduleHolder.moduleInfo = null;
CompatActivity.getCompatActivity(button).refreshUI();
}
}).setNegativeButton(R.string.master_delete_no, (v, i) -> {}).create().show();
}).setNegativeButton(R.string.master_delete_no, (v, i) -> {
}).create().show();
return true;
}
},
CONFIG(R.drawable.ic_baseline_app_settings_alt_24) {
CONFIG() {
@Override
public void update(Chip button, ModuleHolder moduleHolder) {
button.setChipIcon(button.getContext().getResources().getDrawable(R.drawable.ic_baseline_app_settings_alt_24));
button.setText("Config");
}
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void doAction(Chip button, ModuleHolder moduleHolder) {
String config = moduleHolder.getMainModuleConfig();
if (config == null) return;
if (AndroidacyUtil.isAndroidacyLink(config)) {
@ -183,19 +204,20 @@ public enum ActionButtonType {
},
SUPPORT() {
@Override
public void update(ImageButton button, ModuleHolder moduleHolder) {
public void update(Chip button, ModuleHolder moduleHolder) {
ModuleInfo moduleInfo = moduleHolder.getMainModuleInfo();
button.setImageResource(supportIconForUrl(moduleInfo.support));
button.setChipIcon(button.getContext().getResources().getDrawable(supportIconForUrl(moduleInfo.support)));
button.setText("Support");
}
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void doAction(Chip button, ModuleHolder moduleHolder) {
IntentHelper.openUrl(button.getContext(), moduleHolder.getMainModuleInfo().support);
}
},
DONATE() {
@Override
public void update(ImageButton button, ModuleHolder moduleHolder) {
public void update(Chip button, ModuleHolder moduleHolder) {
ModuleInfo moduleInfo = moduleHolder.getMainModuleInfo();
int icon = R.drawable.ic_baseline_monetization_on_24;
if (moduleInfo.donate.startsWith("https://www.paypal.me/")) {
@ -203,11 +225,12 @@ public enum ActionButtonType {
} else if (moduleInfo.donate.startsWith("https://www.patreon.com/")) {
icon = R.drawable.ic_patreon;
}
button.setImageResource(icon);
button.setChipIcon(button.getContext().getResources().getDrawable(icon));
button.setText("Donate");
}
@Override
public void doAction(ImageButton button, ModuleHolder moduleHolder) {
public void doAction(Chip button, ModuleHolder moduleHolder) {
IntentHelper.openUrl(button.getContext(), moduleHolder.getMainModuleInfo().donate);
}
};
@ -239,13 +262,13 @@ public enum ActionButtonType {
this.iconId = iconId;
}
public void update(ImageButton button, ModuleHolder moduleHolder) {
button.setImageResource(this.iconId);
public void update(Chip button, ModuleHolder moduleHolder) {
button.setChipIcon(button.getContext().getResources().getDrawable(this.iconId));
}
public abstract void doAction(ImageButton button, ModuleHolder moduleHolder);
public abstract void doAction(Chip button, ModuleHolder moduleHolder);
public boolean doActionLong(ImageButton button, ModuleHolder moduleHolder) {
public boolean doActionLong(Chip button, ModuleHolder moduleHolder) {
return false;
}
}

@ -25,12 +25,14 @@ import com.fox2code.mmm.manager.LocalModuleInfo;
import com.fox2code.mmm.manager.ModuleInfo;
import com.fox2code.mmm.manager.ModuleManager;
import com.fox2code.mmm.repo.RepoModule;
import com.google.android.material.chip.Chip;
import com.google.android.material.switchmaterial.SwitchMaterial;
import com.topjohnwu.superuser.internal.UiThreadHandler;
import java.util.ArrayList;
import java.util.Objects;
public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdapter.ViewHolder> {
private static final boolean DEBUG = false;
public final ArrayList<ModuleHolder> moduleHolders = new ArrayList<>();
@ -70,7 +72,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
private final TextView creditText;
private final TextView descriptionText;
private final TextView updateText;
private final ImageButton[] actionsButtons;
private final Chip[] actionsButtons;
private final ArrayList<ActionButtonType> actionButtonsTypes;
private boolean initState;
public ModuleHolder moduleHolder;
@ -86,7 +88,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
this.creditText = itemView.findViewById(R.id.credit_text);
this.descriptionText = itemView.findViewById(R.id.description_text);
this.updateText = itemView.findViewById(R.id.updated_text);
this.actionsButtons = new ImageButton[6];
this.actionsButtons = new Chip[6];
this.actionsButtons[0] = itemView.findViewById(R.id.button_action1);
this.actionsButtons[1] = itemView.findViewById(R.id.button_action2);
this.actionsButtons[2] = itemView.findViewById(R.id.button_action3);
@ -110,7 +112,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
this.buttonAction.setClickable(false);
this.switchMaterial.setEnabled(false);
this.switchMaterial.setOnCheckedChangeListener((v, checked) -> {
if (this.initState) return; // Skip if non user
if (this.initState) return; // Skip if non user
ModuleHolder moduleHolder = this.moduleHolder;
if (moduleHolder != null && moduleHolder.moduleInfo != null) {
ModuleInfo moduleInfo = moduleHolder.moduleInfo;
@ -128,7 +130,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
ModuleHolder moduleHolder = this.moduleHolder;
if (index < this.actionButtonsTypes.size() && moduleHolder != null) {
this.actionButtonsTypes.get(index)
.doAction((ImageButton) v, moduleHolder);
.doAction((Chip) v, moduleHolder);
if (moduleHolder.shouldRemove()) {
this.cardView.setVisibility(View.GONE);
}
@ -140,7 +142,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
boolean didSomething = false;
if (index < this.actionButtonsTypes.size() && moduleHolder != null) {
didSomething = this.actionButtonsTypes.get(index)
.doActionLong((ImageButton) v, moduleHolder);
.doActionLong((Chip) v, moduleHolder);
if (moduleHolder.shouldRemove()) {
this.cardView.setVisibility(View.GONE);
}
@ -232,7 +234,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
this.switchMaterial.setEnabled(!showCaseMode &&
!moduleHolder.hasFlag(ModuleInfo.FLAG_MODULE_UPDATING));
for (int i = 0; i < this.actionsButtons.length; i++) {
ImageButton imageButton = this.actionsButtons[i];
Chip imageButton = this.actionsButtons[i];
if (i < this.actionButtonsTypes.size()) {
imageButton.setVisibility(View.VISIBLE);
imageButton.setImportantForAccessibility(
@ -272,7 +274,7 @@ public final class ModuleViewAdapter extends RecyclerView.Adapter<ModuleViewAdap
this.descriptionText.setText(" ");
this.switchMaterial.setEnabled(false);
this.actionButtonsTypes.clear();
for (ImageButton button : this.actionsButtons) {
for (Chip button : this.actionsButtons) {
button.setVisibility(View.GONE);
button.setImportantForAccessibility(
View.IMPORTANT_FOR_ACCESSIBILITY_NO);

@ -81,6 +81,12 @@ public class SettingsActivity extends CompatActivity {
enableBlur.setSummary(R.string.require_android_6);
enableBlur.setEnabled(false);
}
Preference disableMonet = findPreference("pref_disable_monet");
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
disableMonet.setSummary(R.string.require_android_12);
disableMonet.setEnabled(false);
}
Preference forceEnglish = findPreference("pref_force_english");
forceEnglish.setOnPreferenceChangeListener((preference, newValue) -> {
CompatThemeWrapper compatThemeWrapper =

@ -0,0 +1,6 @@
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M16.24,11.51l1.57,-1.57l-3.75,-3.75l-1.57,1.57L8.35,3.63c-0.78,-0.78 -2.05,-0.78 -2.83,0l-1.9,1.9c-0.78,0.78 -0.78,2.05 0,2.83l4.13,4.13L3,17.25V21h3.75l4.76,-4.76l4.13,4.13c0.95,0.95 2.23,0.6 2.83,0l1.9,-1.9c0.78,-0.78 0.78,-2.05 0,-2.83L16.24,11.51zM9.18,11.07L5.04,6.94l1.89,-1.9c0,0 0,0 0,0l1.27,1.27L7.02,7.5l1.41,1.41l1.19,-1.19l1.45,1.45L9.18,11.07zM17.06,18.96l-4.13,-4.13l1.9,-1.9l1.45,1.45l-1.19,1.19l1.41,1.41l1.19,-1.19l1.27,1.27L17.06,18.96z"/>
<path android:fillColor="@android:color/white" android:pathData="M20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.47,-0.47 -1.12,-0.29 -1.41,0l-1.83,1.83l3.75,3.75L20.71,7.04z"/>
</vector>

@ -19,22 +19,25 @@
app:cardPreventCornerOverlap="true"
app:cardElevation="0dp"
app:strokeWidth="0dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp">
android:layout_margin="8dp"
app:layout_constraintBottom_toBottomOf="@+id/description_text"
app:layout_constraintTop_toBottomOf="@+id/description_text">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_action"
android:textSize="16sp"
android:src="@drawable/ic_baseline_delete_forever_24"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:background="@android:color/transparent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:importantForAccessibility="no"
android:layout_marginLeft="8dp"
android:src="@drawable/ic_baseline_delete_forever_24"
android:textSize="16sp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="RtlHardcoded" />
<!-- Module components -->
@ -44,60 +47,59 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintRight_toRightOf="parent" />
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title_text"
android:textSize="16sp"
android:maxLines="1"
android:text="@string/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
android:maxLines="1"
android:text="@string/loading"
android:textSize="16sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/credit_text"
android:textSize="12sp"
android:text="@string/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title_text"
android:text="@string/loading"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/title_text" />
<TextView
android:id="@+id/description_text"
android:textSize="16sp"
android:text="@string/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_below="@+id/credit_text"
android:layout_marginTop="4dp"
android:text="@string/loading"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@id/credit_text" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:background="@null"
app:layout_constraintTop_toBottomOf="@+id/description_text"
app:layout_constraintLeft_toLeftOf="parent">
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/description_text">
<TextView
android:id="@+id/updated_text"
android:textSize="12sp"
android:text="@string/loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="bottom"
app:layout_constraintTop_toTopOf="parent"
android:text="@string/loading"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<!-- Module actions -->
<androidx.appcompat.widget.AppCompatImageButton
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_action1"
android:textSize="16sp"
android:visibility="gone"
@ -186,7 +188,92 @@
android:importantForAccessibility="no"
android:layout_marginLeft="8dp"
android:layout_marginBottom="1dp"
tools:ignore="RtlHardcoded" />
tools:ignore="RtlHardcoded" />-->
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/div"
android:layout_width="match_parent"
android:layout_margin="8dp"
android:layout_height="2dp"
android:visibility="gone"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/constraintLayout"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constraintLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:background="@null"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/div">
<!-- Module actions -->
<HorizontalScrollView
android:id="@+id/horizontalScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.chip.ChipGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:padding="4dp"
app:singleLine="true">
<com.google.android.material.chip.Chip
android:id="@+id/button_action1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
<com.google.android.material.chip.Chip
android:id="@+id/button_action2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
<com.google.android.material.chip.Chip
android:id="@+id/button_action3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
<com.google.android.material.chip.Chip
android:id="@+id/button_action4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
<com.google.android.material.chip.Chip
android:id="@+id/button_action5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
<com.google.android.material.chip.Chip
android:id="@+id/button_action6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:visibility="gone"
app:chipIcon="@drawable/ic_baseline_error_24" />
</com.google.android.material.chip.ChipGroup>
</HorizontalScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="system_neutral1_0">@android:color/system_neutral1_0</color>
<color name="system_neutral1_10">@android:color/system_neutral1_10</color>
<color name="system_neutral1_50">@android:color/system_neutral1_50</color>
<color name="system_neutral1_100">@android:color/system_neutral1_100</color>
<color name="system_neutral1_200">@android:color/system_neutral1_200</color>
<color name="system_neutral1_300">@android:color/system_neutral1_300</color>
<color name="system_neutral1_400">@android:color/system_neutral1_400</color>
<color name="system_neutral1_500">@android:color/system_neutral1_500</color>
<color name="system_neutral1_600">@android:color/system_neutral1_600</color>
<color name="system_neutral1_700">@android:color/system_neutral1_700</color>
<color name="system_neutral1_800">@android:color/system_neutral1_800</color>
<color name="system_neutral1_900">@android:color/system_neutral1_900</color>
<color name="system_neutral1_1000">@android:color/system_neutral1_1000</color>
<color name="system_neutral2_0">@android:color/system_neutral2_0</color>
<color name="system_neutral2_10">@android:color/system_neutral2_10</color>
<color name="system_neutral2_50">@android:color/system_neutral2_50</color>
<color name="system_neutral2_100">@android:color/system_neutral2_100</color>
<color name="system_neutral2_200">@android:color/system_neutral2_200</color>
<color name="system_neutral2_300">@android:color/system_neutral2_300</color>
<color name="system_neutral2_400">@android:color/system_neutral2_400</color>
<color name="system_neutral2_500">@android:color/system_neutral2_500</color>
<color name="system_neutral2_600">@android:color/system_neutral2_600</color>
<color name="system_neutral2_700">@android:color/system_neutral2_700</color>
<color name="system_neutral2_800">@android:color/system_neutral2_800</color>
<color name="system_neutral2_900">@android:color/system_neutral2_900</color>
<color name="system_neutral2_1000">@android:color/system_neutral2_1000</color>
<color name="system_accent1_0">@android:color/system_accent1_0</color>
<color name="system_accent1_10">@android:color/system_accent1_10</color>
<color name="system_accent1_50">@android:color/system_accent1_50</color>
<color name="system_accent1_100">@android:color/system_accent1_100</color>
<color name="system_accent1_200">@android:color/system_accent1_200</color>
<color name="system_accent1_300">@android:color/system_accent1_300</color>
<color name="system_accent1_400">@android:color/system_accent1_400</color>
<color name="system_accent1_500">@android:color/system_accent1_500</color>
<color name="system_accent1_600">@android:color/system_accent1_600</color>
<color name="system_accent1_700">@android:color/system_accent1_700</color>
<color name="system_accent1_800">@android:color/system_accent1_800</color>
<color name="system_accent1_900">@android:color/system_accent1_900</color>
<color name="system_accent1_1000">@android:color/system_accent1_1000</color>
<color name="system_accent2_0">@android:color/system_accent2_0</color>
<color name="system_accent2_10">@android:color/system_accent2_10</color>
<color name="system_accent2_50">@android:color/system_accent2_50</color>
<color name="system_accent2_100">@android:color/system_accent2_100</color>
<color name="system_accent2_200">@android:color/system_accent2_200</color>
<color name="system_accent2_300">@android:color/system_accent2_300</color>
<color name="system_accent2_400">@android:color/system_accent2_400</color>
<color name="system_accent2_500">@android:color/system_accent2_500</color>
<color name="system_accent2_600">@android:color/system_accent2_600</color>
<color name="system_accent2_700">@android:color/system_accent2_700</color>
<color name="system_accent2_800">@android:color/system_accent2_800</color>
<color name="system_accent2_900">@android:color/system_accent2_900</color>
<color name="system_accent2_1000">@android:color/system_accent2_1000</color>
<color name="system_accent3_0">@android:color/system_accent3_0</color>
<color name="system_accent3_10">@android:color/system_accent3_10</color>
<color name="system_accent3_50">@android:color/system_accent3_50</color>
<color name="system_accent3_100">@android:color/system_accent3_100</color>
<color name="system_accent3_200">@android:color/system_accent3_200</color>
<color name="system_accent3_300">@android:color/system_accent3_300</color>
<color name="system_accent3_400">@android:color/system_accent3_400</color>
<color name="system_accent3_500">@android:color/system_accent3_500</color>
<color name="system_accent3_600">@android:color/system_accent3_600</color>
<color name="system_accent3_700">@android:color/system_accent3_700</color>
<color name="system_accent3_800">@android:color/system_accent3_800</color>
<color name="system_accent3_900">@android:color/system_accent3_900</color>
<color name="system_accent3_1000">@android:color/system_accent3_1000</color>
<color name="launcher_icon_background">@android:color/system_accent1_100</color>
<color name="launcher_icon">@android:color/system_neutral2_700</color>
</resources>

@ -0,0 +1,37 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.MagiskModuleManager.Light" parent="Theme.Material3.DynamicColors.Light">
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="colorBackgroundFloating">@color/system_accent2_200</item>
<item name="android:windowBackground">@color/system_accent2_100</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Choice.Light</item>
</style>
<style name="Widget.Material3.Chip.Choice.Light" parent="Widget.Material3.Chip.Assist">
<item name="chipBackgroundColor">@color/system_accent2_300</item>
<item name="chipStrokeWidth">0dp</item>
<item name="chipIconTint">?attr/colorControlNormal</item>
</style>
<style name="Theme.MagiskModuleManager.Transparent.Light" parent="Theme.MagiskModuleManager.Light" />
<style name="Theme.MagiskModuleManager.Dark" parent="Theme.Material3.DynamicColors.Dark">
<item name="android:statusBarColor">@color/status_bar_color</item>
<item name="colorBackgroundFloating">@color/system_accent2_800</item>
<item name="android:windowBackground">@color/system_accent2_900</item>
<item name="chipStyle">@style/Widget.Material3.Chip.Choice.Dark</item>
</style>
<style name="Widget.Material3.Chip.Choice.Dark" parent="Widget.Material3.Chip.Assist">
<item name="chipBackgroundColor">@color/system_accent2_700</item>
<item name="chipStrokeWidth">0dp</item>
<item name="chipIconTint">?attr/colorControlNormal</item>
</style>
<!-- Base application theme. -->
<style name="Theme.MagiskModuleManager.Transparent.Dark" parent="Theme.MagiskModuleManager.Dark" />
<style name="Theme.MagiskModuleManager" parent="Theme.MagiskModuleManager.Light" />
</resources>

@ -13,4 +13,5 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="status_bar_color">@color/black_transparent</color>
<color name="module_holder_div">@color/black_transparent</color>
</resources>

@ -24,6 +24,7 @@
<string name="donate">Donate</string>
<string name="submit_modules">Submit a module</string>
<string name="require_android_6">Requires Android 6.0+</string>
<string name="require_android_12">Requires Android 12+</string>
<string name="install_terminal_reboot_now">Reboot</string>
<string name="yes">Yes</string>
<string name="no">No</string>
@ -46,6 +47,7 @@
<string name="prevent_reboot_pref">Prevent reboot</string>
<string name="prevent_reboot_desc">Prevents unexpected reboots</string>
<string name="pref_category_settings">Settings</string>
<string name="disable_monet">Disable Monet</string>
<string name="pref_category_info">Info</string>
<string name="show_licenses">Show licenses</string>
<string name="licenses">Licences</string>

@ -28,6 +28,13 @@
<item name="dialogCornerRadius">@dimen/card_corner_radius</item>
<item name="colorBackgroundFloating">#FFFFFFFF</item>
<item name="backgroundColor">#FFFFFFFF</item>
<item name="chipStyle">@style/Widget.Material.Chip.Choice.Light</item>
</style>
<style name="Widget.Material.Chip.Choice.Light" parent="Widget.MaterialComponents.Chip.Action">
<item name="chipBackgroundColor">#DADADA</item>
<item name="chipStrokeWidth">0dp</item>
<item name="chipIconTint">@color/black</item>
</style>
<style name="Theme.MagiskModuleManager.Transparent.Light" parent="Theme.MagiskModuleManager.Light">
@ -73,6 +80,13 @@
<item name="dialogCornerRadius">@dimen/card_corner_radius</item>
<item name="colorBackgroundFloating">#FF1E1E1E</item>
<item name="backgroundColor">#FF111111</item>
<item name="chipStyle">@style/Widget.Material.Chip.Choice.Dark</item>
</style>
<style name="Widget.Material.Chip.Choice.Dark" parent="Widget.MaterialComponents.Chip.Action">
<item name="chipBackgroundColor">#1C1C1C</item>
<item name="chipStrokeWidth">0dp</item>
<item name="chipIconTint">@color/white</item>
</style>
<!-- Base application theme. -->

@ -71,6 +71,13 @@
app:title="@string/disable_chips_in_description"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_disable_monet"
app:icon="@drawable/ic_baseline_design_services_24"
app:title="@string/disable_monet"
app:singleLineTitle="false" />
<SwitchPreferenceCompat
app:defaultValue="false"
app:key="pref_wrap_text"

@ -7,7 +7,7 @@ buildscript {
}
project.ext.latestAboutLibsRelease = "10.1.0"
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${latestAboutLibsRelease}"
// NOTE: Do not place your application dependencies here; they belong

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=9afb3ca688fc12c761a0e9e4321e4d24e977a4a8916c8a768b1fe05ddb4d6b66

Loading…
Cancel
Save