Fix queue changing
This commit is contained in:
parent
69c76556a2
commit
891f1bce34
34 changed files with 1007 additions and 132 deletions
|
@ -18,12 +18,14 @@ package code.name.monkey.appthemehelper.common.prefs.supportv7.dialogs;
|
|||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.preference.DialogPreference;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +74,7 @@ public class ATEPreferenceDialogFragment extends DialogFragment {
|
|||
onDialogClosed(false);
|
||||
});
|
||||
|
||||
this.onPrepareDialogBuilder(materialDialog);
|
||||
//this.onPrepareDialogBuilder(materialDialog);
|
||||
AlertDialog dialog = materialDialog.create();
|
||||
if (this.needInputMethod()) {
|
||||
this.requestInputMethod(dialog);
|
||||
|
@ -84,11 +86,11 @@ public class ATEPreferenceDialogFragment extends DialogFragment {
|
|||
|
||||
}
|
||||
|
||||
protected boolean needInputMethod() {
|
||||
return false;
|
||||
protected void onPrepareDialogBuilder(MaterialAlertDialogBuilder builder) {
|
||||
}
|
||||
|
||||
protected void onPrepareDialogBuilder(MaterialAlertDialogBuilder builder) {
|
||||
protected boolean needInputMethod() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void requestInputMethod(Dialog dialog) {
|
||||
|
|
|
@ -17,6 +17,7 @@ import android.widget.RadioButton;
|
|||
import android.widget.SeekBar;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
@ -26,10 +27,13 @@ import androidx.appcompat.widget.AppCompatEditText;
|
|||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import code.name.monkey.appthemehelper.R;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import code.name.monkey.appthemehelper.R;
|
||||
|
||||
/**
|
||||
* @author afollestad, plusCubed
|
||||
*/
|
||||
|
@ -80,7 +84,7 @@ public final class TintHelper {
|
|||
@CheckResult
|
||||
@NonNull
|
||||
public static Drawable createTintedDrawable(Context context,
|
||||
@DrawableRes int res, @ColorInt int color) {
|
||||
@DrawableRes int res, @ColorInt int color) {
|
||||
Drawable drawable = ContextCompat.getDrawable(context, res);
|
||||
return createTintedDrawable(drawable, color);
|
||||
}
|
||||
|
@ -105,9 +109,9 @@ public final class TintHelper {
|
|||
if (drawable == null) {
|
||||
return null;
|
||||
}
|
||||
drawable = DrawableCompat.wrap(drawable.mutate());
|
||||
DrawableCompat.setTintList(drawable, sl);
|
||||
return drawable;
|
||||
Drawable temp = DrawableCompat.wrap(drawable.mutate());
|
||||
DrawableCompat.setTintList(temp, sl);
|
||||
return temp;
|
||||
}
|
||||
|
||||
public static void setCursorTint(@NonNull EditText editText, @ColorInt int color) {
|
||||
|
@ -278,13 +282,13 @@ public final class TintHelper {
|
|||
}
|
||||
|
||||
public static void setTintAuto(final @NonNull View view, final @ColorInt int color,
|
||||
boolean background) {
|
||||
boolean background) {
|
||||
setTintAuto(view, color, background, ATHUtil.INSTANCE.isWindowBackgroundDark(view.getContext()));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setTintAuto(final @NonNull View view, final @ColorInt int color,
|
||||
boolean background, final boolean isDark) {
|
||||
boolean background, final boolean isDark) {
|
||||
if (!background) {
|
||||
if (view instanceof FloatingActionButton) {
|
||||
setTint((FloatingActionButton) view, color, isDark);
|
||||
|
@ -346,7 +350,7 @@ public final class TintHelper {
|
|||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void setTintSelector(@NonNull View view, @ColorInt final int color, final boolean darker,
|
||||
final boolean useDarkTheme) {
|
||||
final boolean useDarkTheme) {
|
||||
final boolean isColorLight = ColorUtil.INSTANCE.isColorLight(color);
|
||||
final int disabled = ContextCompat.getColor(view.getContext(),
|
||||
useDarkTheme ? R.color.ate_button_disabled_dark : R.color.ate_button_disabled_light);
|
||||
|
@ -438,7 +442,7 @@ public final class TintHelper {
|
|||
}
|
||||
|
||||
private static Drawable modifySwitchDrawable(@NonNull Context context, @NonNull Drawable from, @ColorInt int tint,
|
||||
boolean thumb, boolean compatSwitch, boolean useDarker) {
|
||||
boolean thumb, boolean compatSwitch, boolean useDarker) {
|
||||
if (useDarker) {
|
||||
tint = ColorUtil.INSTANCE.shiftColor(tint, 1.1f);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue