Add support for AndroidX preferences (#1971)
* Add stubs for AndroidX preferences * Update extensions for AndroidX preferences
This commit is contained in:
@ -1,10 +1,7 @@
|
||||
package android.support.v7.preference;
|
||||
|
||||
/**
|
||||
* Created by Carlos on 5/9/2018.
|
||||
*/
|
||||
|
||||
public abstract class DialogPreference extends Preference {
|
||||
|
||||
public CharSequence getDialogTitle() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
@ -20,4 +17,5 @@ public abstract class DialogPreference extends Preference {
|
||||
public void setDialogMessage(CharSequence dialogMessage) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package android.support.v7.preference;
|
||||
import android.content.Context;
|
||||
|
||||
public class EditTextPreference extends DialogPreference {
|
||||
|
||||
public EditTextPreference(Context context) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
@ -14,4 +15,5 @@ public class EditTextPreference extends DialogPreference {
|
||||
public void setText(String text) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,21 +2,17 @@ package android.support.v7.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
/**
|
||||
* Created by Carlos on 5/9/2018.
|
||||
*/
|
||||
|
||||
public class ListPreference extends Preference {
|
||||
|
||||
public ListPreference(Context context) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setEntries(CharSequence[] entries) {
|
||||
public CharSequence[] getEntries() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence[] getEntries() {
|
||||
public void setEntries(CharSequence[] entries) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
@ -24,11 +20,11 @@ public class ListPreference extends Preference {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setEntryValues(CharSequence[] entryValues) {
|
||||
public CharSequence[] getEntryValues() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence[] getEntryValues() {
|
||||
public void setEntryValues(CharSequence[] entryValues) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
@ -43,4 +39,5 @@ public class ListPreference extends Preference {
|
||||
public void setValue(String value) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,6 @@
|
||||
package android.support.v7.preference;
|
||||
|
||||
/**
|
||||
* Created by Carlos on 5/9/2018.
|
||||
*/
|
||||
|
||||
public class Preference {
|
||||
public interface OnPreferenceChangeListener {
|
||||
boolean onPreferenceChange(Preference preference, Object newValue);
|
||||
}
|
||||
|
||||
public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) {
|
||||
throw new RuntimeException("Stub!");
|
||||
@ -29,7 +22,7 @@ public class Preference {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
public void setSummary(CharSequence summary) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
@ -37,7 +30,7 @@ public class Preference {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setSummary(CharSequence summary) {
|
||||
public void setKey(String key) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
@ -45,7 +38,12 @@ public class Preference {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public interface OnPreferenceChangeListener {
|
||||
boolean onPreferenceChange(Preference preference, Object newValue);
|
||||
}
|
||||
|
||||
public interface OnPreferenceClickListener {
|
||||
boolean onPreferenceClick(Preference preference);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,11 +2,7 @@ package android.support.v7.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
/**
|
||||
* Created by Carlos on 5/7/2018.
|
||||
*/
|
||||
|
||||
public class PreferenceScreen{
|
||||
public class PreferenceScreen {
|
||||
|
||||
public boolean addPreference(Preference preference) {
|
||||
throw new RuntimeException("Stub!");
|
||||
@ -15,4 +11,5 @@ public class PreferenceScreen{
|
||||
public Context getContext() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
package androidx.preference;
|
||||
|
||||
public abstract class DialogPreference extends Preference {
|
||||
|
||||
public CharSequence getDialogTitle() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setDialogTitle(CharSequence dialogTitle) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence getDialogMessage() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setDialogMessage(CharSequence dialogMessage) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package androidx.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class EditTextPreference extends DialogPreference {
|
||||
|
||||
public EditTextPreference(Context context) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package androidx.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class ListPreference extends Preference {
|
||||
|
||||
public ListPreference(Context context) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence[] getEntries() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setEntries(CharSequence[] entries) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public int findIndexOfValue(String value) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence[] getEntryValues() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setEntryValues(CharSequence[] entryValues) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setValueIndex(int index) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package androidx.preference;
|
||||
|
||||
public class Preference {
|
||||
|
||||
public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence getTitle() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setTitle(CharSequence title) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public CharSequence getSummary() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setSummary(CharSequence summary) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public void setDefaultValue(Object defaultValue) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public interface OnPreferenceChangeListener {
|
||||
boolean onPreferenceChange(Preference preference, Object newValue);
|
||||
}
|
||||
|
||||
public interface OnPreferenceClickListener {
|
||||
boolean onPreferenceClick(Preference preference);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package androidx.preference;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class PreferenceScreen {
|
||||
|
||||
public boolean addPreference(Preference preference) {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
public Context getContext() {
|
||||
throw new RuntimeException("Stub!");
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +1,9 @@
|
||||
package eu.kanade.tachiyomi.source;
|
||||
|
||||
import android.support.v7.preference.PreferenceScreen;
|
||||
|
||||
/**
|
||||
* Created by Carlos on 5/7/2018.
|
||||
*/
|
||||
|
||||
public interface ConfigurableSource {
|
||||
|
||||
void setupPreferenceScreen(PreferenceScreen screen);
|
||||
void setupPreferenceScreen(android.support.v7.preference.PreferenceScreen screen);
|
||||
|
||||
void setupPreferenceScreen(androidx.preference.PreferenceScreen screen);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user