mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2026-01-17 01:02:34 +01:00
ConfigurableExtension(PreferenceScreen) support (#163)
* initial PreferenceScreen support, works with 'NeoXXX Scans' (pt-br) * convert EditTextPreference to json successfully * commit what I've got * bring back the old SharedPreferences for CustomContext, implement Toast * put back syer's implementation
This commit is contained in:
@@ -1,4 +1,32 @@
|
||||
package androidx.preference;
|
||||
|
||||
public class PreferenceScreen {
|
||||
/*
|
||||
* Copyright (C) Contributors to the Suwayomi project
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class PreferenceScreen extends Preference {
|
||||
private List<Preference> preferences = new LinkedList<>();
|
||||
|
||||
|
||||
public PreferenceScreen(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public boolean addPreference(Preference preference) {
|
||||
preferences.add(preference);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public List<Preference> getPreferences(){
|
||||
return preferences;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user