mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2026-01-20 18:52:36 +01:00
Override getDefaultValueType with values based on the preference (#167)
This commit is contained in:
@@ -44,4 +44,9 @@ public class EditTextPreference extends DialogPreference {
|
||||
public interface OnBindEditTextListener {
|
||||
void onBindEditText(@NonNull EditText editText);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDefaultValueType() {
|
||||
return "String";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,9 @@ public class ListPreference extends Preference {
|
||||
public String getValue() { throw new RuntimeException("Stub!"); }
|
||||
|
||||
public void setValue(String value) { throw new RuntimeException("Stub!"); }
|
||||
|
||||
@Override
|
||||
public String getDefaultValueType() {
|
||||
return "String";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,4 +29,9 @@ public class MultiSelectListPreference extends DialogPreference {
|
||||
public Set<String> getValues() { throw new RuntimeException("Stub!"); }
|
||||
|
||||
public int findIndexOfValue(String value) { throw new RuntimeException("Stub!"); }
|
||||
|
||||
@Override
|
||||
public String getDefaultValueType() {
|
||||
return "Set";
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ package androidx.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class SwitchPreferenceCompat extends Preference {
|
||||
public class SwitchPreferenceCompat extends TwoStatePreference {
|
||||
// reference: https://android.googlesource.com/platform/frameworks/support/+/996971f962fcd554339a7cb2859cef9ca89dbcb7/preference/preference/src/main/java/androidx/preference/CheckBoxPreference.java
|
||||
|
||||
public SwitchPreferenceCompat(Context context) {
|
||||
|
||||
@@ -29,4 +29,8 @@ public class TwoStatePreference extends Preference {
|
||||
|
||||
public void setDisableDependentsState(boolean disableDependentsState) { throw new RuntimeException("Stub!"); }
|
||||
|
||||
@Override
|
||||
public String getDefaultValueType() {
|
||||
return "Boolean";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user