Add support for AndroidX preferences (#1971)

* Add stubs for AndroidX preferences

* Update extensions for AndroidX preferences
This commit is contained in:
arkon
2020-01-05 11:16:12 -05:00
committed by GitHub
parent e9d1479dd0
commit 98df581cfd
34 changed files with 470 additions and 54 deletions

View File

@ -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!");
}
}

View File

@ -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!");
}
}

View File

@ -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!");
}
}

View File

@ -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);
}
}

View File

@ -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!");
}
}