Browse Source

Rework preference screens to use AndroidX

This brings proper theming to these screens (fixes #521) and finally solves the issue of the title base now showing up in sub-screens (#491 and many, many others)
pull/565/head
Eric Kok 5 years ago
parent
commit
8f498b35e5
  1. 52
      app/src/main/AndroidManifest.xml
  2. 3
      app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java
  3. 14
      app/src/main/java/org/transdroid/core/app/settings/NotificationSettings.java
  4. 12
      app/src/main/java/org/transdroid/core/app/settings/SystemSettings.java
  5. 21
      app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java
  6. 5
      app/src/main/java/org/transdroid/core/gui/settings/InterceptableEditTextPreference.java
  7. 44
      app/src/main/java/org/transdroid/core/gui/settings/KeyBoundPreferencesActivity.java
  8. 20
      app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java
  9. 21
      app/src/main/java/org/transdroid/core/gui/settings/NotificationSettingsActivity.java
  10. 132
      app/src/main/java/org/transdroid/core/gui/settings/PreferenceCompatActivity.java
  11. 68
      app/src/main/java/org/transdroid/core/gui/settings/RingtonePreference.java
  12. 10
      app/src/main/java/org/transdroid/core/gui/settings/RssfeedPreference.java
  13. 24
      app/src/main/java/org/transdroid/core/gui/settings/ServerPreference.java
  14. 8
      app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java
  15. 10
      app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java
  16. 4
      app/src/main/java/org/transdroid/core/gui/settings/WebsearchPreference.java
  17. 3
      app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettings.java
  18. 6
      app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettingsActivity.java
  19. 11
      app/src/main/java/org/transdroid/core/seedbox/SeedboxPreference.java
  20. 11
      app/src/main/java/org/transdroid/core/seedbox/SeedstuffSettings.java
  21. 18
      app/src/main/java/org/transdroid/core/seedbox/SeedstuffSettingsActivity.java
  22. 18
      app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettingsActivity.java
  23. 18
      app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettingsActivity.java
  24. 6
      app/src/main/java/org/transdroid/core/seedbox/XirvikSharedSettingsActivity.java
  25. 37
      app/src/main/res/values-night/styles_transdroid.xml
  26. 5
      app/src/main/res/values/changelog.xml
  27. 25
      app/src/main/res/values/styles.xml
  28. 40
      app/src/main/res/values/styles_transdroid.xml
  29. 42
      app/src/main/res/xml/pref_help.xml
  30. 143
      app/src/main/res/xml/pref_main.xml
  31. 100
      app/src/main/res/xml/pref_notifications.xml
  32. 70
      app/src/main/res/xml/pref_rssfeed.xml
  33. 96
      app/src/main/res/xml/pref_seedbox_dediseedbox.xml
  34. 96
      app/src/main/res/xml/pref_seedbox_seedstuff.xml
  35. 109
      app/src/main/res/xml/pref_seedbox_xirvikdedi.xml
  36. 96
      app/src/main/res/xml/pref_seedbox_xirviksemi.xml
  37. 105
      app/src/main/res/xml/pref_seedbox_xirvikshared.xml
  38. 288
      app/src/main/res/xml/pref_server.xml
  39. 11
      app/src/main/res/xml/pref_system.xml
  40. 6
      app/src/main/res/xml/pref_websearch.xml

52
app/src/main/AndroidManifest.xml

@ -197,21 +197,47 @@ @@ -197,21 +197,47 @@
</activity>
<!-- Settings screens -->
<activity android:name="org.transdroid.core.gui.settings.MainSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.ServerSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.WebsearchSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.RssfeedSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.NotificationSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.SystemSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.settings.HelpSettingsActivity_" />
<activity android:name="org.transdroid.core.gui.navigation.DialogHelper_" />
<activity
android:name="org.transdroid.core.gui.settings.MainSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.ServerSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.WebsearchSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.RssfeedSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.NotificationSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.SystemSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.settings.HelpSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.gui.navigation.DialogHelper_"
android:theme="@style/TransdroidTheme.Settings" />
<!-- Seedbox settings -->
<activity android:name="org.transdroid.core.seedbox.DediseedboxSettingsActivity_" />
<activity android:name="org.transdroid.core.seedbox.SeedstuffSettingsActivity_" />
<activity android:name="org.transdroid.core.seedbox.XirvikSharedSettingsActivity_" />
<activity android:name="org.transdroid.core.seedbox.XirvikSemiSettingsActivity_" />
<activity android:name="org.transdroid.core.seedbox.XirvikDediSettingsActivity_" />
<activity
android:name="org.transdroid.core.seedbox.DediseedboxSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.seedbox.SeedstuffSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.seedbox.XirvikSharedSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.seedbox.XirvikSemiSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<activity
android:name="org.transdroid.core.seedbox.XirvikDediSettingsActivity_"
android:theme="@style/TransdroidTheme.Settings" />
<!-- Search -->
<activity

3
app/src/main/java/org/transdroid/core/app/settings/ApplicationSettings.java

@ -19,9 +19,10 @@ package org.transdroid.core.app.settings; @@ -19,9 +19,10 @@ package org.transdroid.core.app.settings;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import android.text.TextUtils;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;

14
app/src/main/java/org/transdroid/core/app/settings/NotificationSettings.java

@ -16,17 +16,18 @@ @@ -16,17 +16,18 @@
*/
package org.transdroid.core.app.settings;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.RootContext;
import org.transdroid.R;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.provider.Settings;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.RootContext;
import org.transdroid.R;
/**
* Allows instantiation of the settings specified in R.xml.pref_notifications.
* @author Eric Kok
@ -91,7 +92,6 @@ public class NotificationSettings { @@ -91,7 +92,6 @@ public class NotificationSettings {
/**
* Whether the device should vibrate on a new notification
* @return
*/
public boolean shouldVibrate() {
return prefs.getBoolean("notifications_vibrate", false);

12
app/src/main/java/org/transdroid/core/app/settings/SystemSettings.java

@ -16,16 +16,16 @@ @@ -16,16 +16,16 @@
*/
package org.transdroid.core.app.settings;
import java.util.Date;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.RootContext;
import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.RootContext;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import java.util.Date;
/**
* Allows instantiation of the settings specified in R.xml.pref_system.

21
app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java

@ -16,6 +16,16 @@ @@ -16,6 +16,16 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
@ -26,16 +36,6 @@ import org.transdroid.core.gui.log.ErrorLogSender; @@ -26,16 +36,6 @@ import org.transdroid.core.gui.log.ErrorLogSender;
import org.transdroid.core.gui.navigation.DialogHelper;
import org.transdroid.core.gui.navigation.NavigationHelper;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
@EActivity
public class HelpSettingsActivity extends PreferenceCompatActivity {
@ -52,7 +52,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity { @@ -52,7 +52,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity {
@Bean
protected SettingsPersistence settingsPersistence;
@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

5
app/src/main/java/org/transdroid/core/gui/settings/InterceptableEditTextPreference.java

@ -2,10 +2,11 @@ package org.transdroid.core.gui.settings; @@ -2,10 +2,11 @@ package org.transdroid.core.gui.settings;
import android.content.Context;
import android.os.Build;
import android.preference.EditTextPreference;
import androidx.annotation.RequiresApi;
import android.util.AttributeSet;
import androidx.annotation.RequiresApi;
import androidx.preference.EditTextPreference;
public class InterceptableEditTextPreference extends EditTextPreference {
private OnPreferenceClickListener overrideClickListener = null;

44
app/src/main/java/org/transdroid/core/gui/settings/KeyBoundPreferencesActivity.java

@ -1,37 +1,37 @@ @@ -1,37 +1,37 @@
/*
/*
* Copyright 2010-2018 Eric Kok et al.
*
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*/
package org.transdroid.core.gui.settings;
import java.util.HashMap;
import java.util.Map;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.text.TextUtils;
import androidx.preference.CheckBoxPreference;
import androidx.preference.EditTextPreference;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Extra;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.preference.CheckBoxPreference;
import android.preference.EditTextPreference;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.text.TextUtils;
import android.text.method.PasswordTransformationMethod;
import java.util.HashMap;
import java.util.Map;
/**
* Abstract activity that helps implement a preference screen for key-bound settings, i.e. settings of which there can
@ -59,7 +59,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -59,7 +59,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
* @param currentMaxKey The value of what is currently the last defined settings object, or -1 of no settings were
* defined so far at all
*/
@SuppressWarnings("deprecation")
protected final void init(int preferencesResId, int currentMaxKey) {
// Load the raw preferences to show in this screen
@ -132,7 +131,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -132,7 +131,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
* @param dependency The base name of the preference to which this preference depends
* @return The concrete {@link EditTextPreference} that is bound to this preference
*/
@SuppressWarnings("deprecation")
protected final EditTextPreference initTextPreference(String baseName, String defValue, String dependency) {
// Update the loaded Preference with the actual preference key to load/store with
EditTextPreference pref = (EditTextPreference) findPreference(baseName);
@ -175,7 +173,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -175,7 +173,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
* @param dependency The base name of the preference to which this preference depends
* @return The concrete {@link CheckBoxPreference} that is bound to this preference
*/
@SuppressWarnings("deprecation")
protected final CheckBoxPreference initBooleanPreference(String baseName, boolean defValue, String dependency) {
// Update the loaded Preference with the actual preference key to load/store with
CheckBoxPreference pref = (CheckBoxPreference) findPreference(baseName);
@ -203,7 +200,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -203,7 +200,6 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
* @param defValue The default value for this preference, as shown when no value was yet stored
* @return The concrete {@link ListPreference} that is bound to this preference
*/
@SuppressWarnings("deprecation")
protected final ListPreference initListPreference(String baseName, String defValue) {
// Update the loaded Preference with the actual preference key to load/store with
ListPreference pref = (ListPreference) findPreference(baseName);
@ -216,13 +212,12 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -216,13 +212,12 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
return pref;
}
@SuppressWarnings("deprecation")
protected void showValueOnSummary(String prefKey) {
Preference pref = findPreference(prefKey);
if (sharedPrefs.contains(prefKey)
&& pref instanceof EditTextPreference
&& !TextUtils.isEmpty(sharedPrefs.getString(prefKey, ""))
&& !(((EditTextPreference) pref).getEditText().getTransformationMethod() instanceof PasswordTransformationMethod)) {
&& !isPasswordPref((EditTextPreference) pref)) {
// Non-password edit preferences show the user-entered value
pref.setSummary(sharedPrefs.getString(prefKey, ""));
return;
@ -237,4 +232,9 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi @@ -237,4 +232,9 @@ public abstract class KeyBoundPreferencesActivity extends PreferenceCompatActivi
pref.setSummary(originalSummaries.get(prefKey));
}
protected boolean isPasswordPref(EditTextPreference preference) {
return preference.getKey().startsWith("server_pass_") || preference.getKey().startsWith("server_extrapass")
|| preference.getKey().startsWith("server_ftppass");
}
}

20
app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java

@ -26,9 +26,9 @@ import android.content.SharedPreferences; @@ -26,9 +26,9 @@ import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import androidx.preference.ListPreference;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
@ -69,7 +69,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -69,7 +69,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
protected SearchHelper searchHelper;
protected SharedPreferences prefs;
private OnPreferenceClickListener onAddServer = new OnPreferenceClickListener() {
@SuppressWarnings("deprecation")
@Override
public boolean onPreferenceClick(Preference preference) {
if (navigationHelper.enableSeedboxes())
@ -164,24 +163,19 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -164,24 +163,19 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
// Note: Settings are loaded in onResume()
}
@SuppressWarnings("deprecation")
@Override
protected void onResume() {
super.onResume();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
prefs = getPreferenceManager().getSharedPreferences();
if (getPreferenceScreen() != null) {
getPreferenceScreen().removeAll();
}
boolean enableSearchUi = navigationHelper.enableSearchUi();
boolean enableRssUi = navigationHelper.enableRssUi();
boolean enableDonateLink = !getString(R.string.donate_url).isEmpty();
// Load the preference menu and attach actions
addPreferencesFromResource(R.xml.pref_main);
prefs = getPreferenceManager().getSharedPreferences();
findPreference("header_addserver").setOnPreferenceClickListener(onAddServer);
if (enableSearchUi) {
findPreference("header_addwebsearch").setOnPreferenceClickListener(onAddWebsearch);
@ -291,12 +285,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -291,12 +285,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
}
@Override
public void onBuildHeaders(List<Header> target) {
// TODO: Add two-pane support in settings
super.onBuildHeaders(target);
}
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {

21
app/src/main/java/org/transdroid/core/gui/settings/NotificationSettingsActivity.java

@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
/*
/*
* Copyright 2010-2018 Eric Kok et al.
*
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*/
@ -23,12 +23,13 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener; @@ -23,12 +23,13 @@ import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.transdroid.R;
import org.transdroid.core.app.settings.NotificationSettings;
import org.transdroid.core.service.BootReceiver;
import org.transdroid.core.service.RssCheckerJob;
import org.transdroid.core.service.ServerCheckerJob;
@ -38,7 +39,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple @@ -38,7 +39,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple
@Bean
protected NotificationSettings notificationSettings;
@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -52,7 +52,12 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple @@ -52,7 +52,12 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple
}
@SuppressWarnings("deprecation")
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
((RingtonePreference) findPreference("notifications_sound")).onActivityResult(requestCode, resultCode, data);
}
@Override
protected void onResume() {
super.onResume();
@ -60,7 +65,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple @@ -60,7 +65,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple
getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}
@SuppressWarnings("deprecation")
@Override
protected void onPause() {
super.onPause();
@ -79,7 +83,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple @@ -79,7 +83,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple
RssCheckerJob.schedule(getApplicationContext());
}
@SuppressWarnings("deprecation")
private void updatePrefsEnabled(boolean disabled) {
findPreference("notifications_interval").setEnabled(!disabled);
findPreference("notifications_sound").setEnabled(!disabled);

132
app/src/main/java/org/transdroid/core/gui/settings/PreferenceCompatActivity.java

@ -1,66 +1,74 @@ @@ -1,66 +1,74 @@
package org.transdroid.core.gui.settings;
import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.annotation.XmlRes;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatCallback;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.view.ActionMode;
public class PreferenceCompatActivity extends PreferenceActivity implements AppCompatCallback {
private AppCompatDelegate acd;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
acd = AppCompatDelegate.create(this, this);
acd.onCreate(savedInstanceState);
}
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
acd.onPostCreate(savedInstanceState);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
acd.onConfigurationChanged(newConfig);
}
@Override
protected void onStop() {
super.onStop();
acd.onStop();
}
@Override
protected void onDestroy() {
super.onDestroy();
acd.onDestroy();
}
public ActionBar getSupportActionBar() {
return acd.getSupportActionBar();
}
@Override
public void onSupportActionModeStarted(ActionMode actionMode) {
}
@Override
public void onSupportActionModeFinished(ActionMode actionMode) {
}
@Nullable
@Override
public ActionMode onWindowStartingSupportActionMode(ActionMode.Callback callback) {
return acd.startSupportActionMode(callback);
}
}
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceScreen;
public class PreferenceCompatActivity extends AppCompatActivity implements AppCompatCallback, PreferenceFragmentCompat.OnPreferenceStartScreenCallback {
private PreferenceFragmentCompat fragment;
public void addPreferencesFromResource(@XmlRes int preferencesResId) {
fragment = new RootPreferencesFragment(preferencesResId);
getSupportFragmentManager().beginTransaction().replace(android.R.id.content, fragment).commitNow();
}
public PreferenceManager getPreferenceManager() {
return fragment.getPreferenceManager();
}
public PreferenceScreen getPreferenceScreen() {
return fragment.getPreferenceScreen();
}
public Preference findPreference(CharSequence key) {
return fragment.findPreference(key);
}
@Override
public boolean onPreferenceStartScreen(PreferenceFragmentCompat caller, PreferenceScreen pref) {
LowerPreferencesFragment lowerFragment = new LowerPreferencesFragment(pref);
getSupportFragmentManager().beginTransaction().replace(android.R.id.content, lowerFragment).addToBackStack("lower").commit();
return true;
}
public static class RootPreferencesFragment extends PreferenceFragmentCompat {
private int preferencesResId;
public RootPreferencesFragment(int preferencesResId) {
this.preferencesResId = preferencesResId;
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(preferencesResId);
}
}
public static class LowerPreferencesFragment extends PreferenceFragmentCompat {
private PreferenceScreen prefs;
public LowerPreferencesFragment() {
}
public LowerPreferencesFragment(PreferenceScreen prefs) {
this.prefs = prefs;
}
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
if (prefs != null) {
setPreferenceScreen(prefs);
prefs = null;
}
}
}
}

68
app/src/main/java/org/transdroid/core/gui/settings/RingtonePreference.java

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
package org.transdroid.core.gui.settings;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.provider.Settings;
import android.util.AttributeSet;
import androidx.preference.Preference;
@SuppressWarnings("unused") // Constructors for XML inflation
public class RingtonePreference extends Preference {
private static final int REQUEST_RINGTONE = 0;
public RingtonePreference(Context context) {
super(context);
}
public RingtonePreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
public RingtonePreference(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public RingtonePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
protected void onClick() {
if (!(getContext() instanceof Activity)) {
return;
}
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, true);
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, Settings.System.DEFAULT_NOTIFICATION_URI);
String existingValue = getSharedPreferences().getString(getKey(), null);
if (existingValue != null) {
if (existingValue.isEmpty()) {
// Select "Silent"
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null);
} else {
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Uri.parse(existingValue));
}
} else {
// No ringtone has been selected, set to the default
intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Settings.System.DEFAULT_NOTIFICATION_URI);
}
((Activity) getContext()).startActivityForResult(intent, REQUEST_RINGTONE);
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_RINGTONE && resultCode == Activity.RESULT_OK && data != null && data.getExtras() != null) {
Uri ringtone = (Uri) data.getExtras().get(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
getSharedPreferences().edit().putString(getKey(), ringtone == null? "": ringtone.toString()).apply();
}
}
}

10
app/src/main/java/org/transdroid/core/gui/settings/RssfeedPreference.java

@ -16,10 +16,11 @@ @@ -16,10 +16,11 @@
*/
package org.transdroid.core.gui.settings;
import org.transdroid.core.app.settings.RssfeedSetting;
import android.content.Context;
import android.preference.Preference;
import androidx.preference.Preference;
import org.transdroid.core.app.settings.RssfeedSetting;
/**
* Represents a {@link RssfeedSetting} in a preferences screen.
@ -35,6 +36,7 @@ public class RssfeedPreference extends Preference { @@ -35,6 +36,7 @@ public class RssfeedPreference extends Preference {
public RssfeedPreference(Context context) {
super(context);
setOnPreferenceClickListener(onPreferenceClicked);
setIconSpaceReserved(false);
}
/**
@ -70,7 +72,7 @@ public class RssfeedPreference extends Preference { @@ -70,7 +72,7 @@ public class RssfeedPreference extends Preference {
};
public interface OnRssfeedClickedListener {
public void onRssfeedClicked(RssfeedSetting rssfeedSetting);
void onRssfeedClicked(RssfeedSetting rssfeedSetting);
}
}

24
app/src/main/java/org/transdroid/core/gui/settings/ServerPreference.java

@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
/*
/*
* Copyright 2010-2018 Eric Kok et al.
*
*
* Transdroid is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* Transdroid is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
*/
package org.transdroid.core.gui.settings;
import org.transdroid.core.app.settings.ServerSetting;
import android.content.Context;
import android.preference.Preference;
import androidx.preference.Preference;
import org.transdroid.core.app.settings.ServerSetting;
/**
* Represents a {@link ServerSetting} in a preferences screen.
@ -31,10 +32,11 @@ public class ServerPreference extends Preference { @@ -31,10 +32,11 @@ public class ServerPreference extends Preference {
protected ServerSetting serverSetting;
private OnServerClickedListener onServerClickedListener = null;
public ServerPreference(Context context) {
super(context);
setOnPreferenceClickListener(onPreferenceClicked);
setIconSpaceReserved(false);
}
/**
@ -49,7 +51,7 @@ public class ServerPreference extends Preference { @@ -49,7 +51,7 @@ public class ServerPreference extends Preference {
setOrder(ORDER_START + serverSetting.getOrder());
return this;
}
/**
* Set a listener that will be notified of click events on this preference
* @param onServerClickedListener The click listener to register
@ -68,9 +70,9 @@ public class ServerPreference extends Preference { @@ -68,9 +70,9 @@ public class ServerPreference extends Preference {
return true;
}
};
public interface OnServerClickedListener {
public void onServerClicked(ServerSetting serverSetting);
}
}

8
app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java

@ -25,10 +25,12 @@ import android.content.Intent; @@ -25,10 +25,12 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceManager;
import androidx.annotation.NonNull;
import androidx.preference.EditTextPreference;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;

10
app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java

@ -25,12 +25,13 @@ import android.content.Intent; @@ -25,12 +25,13 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceManager;
import androidx.annotation.NonNull;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.preference.Preference;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceManager;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;
@ -141,7 +142,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -141,7 +142,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
}
};
@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

4
app/src/main/java/org/transdroid/core/gui/settings/WebsearchPreference.java

@ -17,7 +17,8 @@ @@ -17,7 +17,8 @@
package org.transdroid.core.gui.settings;
import android.content.Context;
import android.preference.Preference;
import androidx.preference.Preference;
import org.transdroid.core.app.settings.WebsearchSetting;
@ -35,6 +36,7 @@ public class WebsearchPreference extends Preference { @@ -35,6 +36,7 @@ public class WebsearchPreference extends Preference {
public WebsearchPreference(Context context) {
super(context);
setOnPreferenceClickListener(onPreferenceClicked);
setIconSpaceReserved(false);
}
/**

3
app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettings.java

@ -19,7 +19,6 @@ package org.transdroid.core.seedbox; @@ -19,7 +19,6 @@ package org.transdroid.core.seedbox;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.EditTextPreference;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
@ -31,8 +30,6 @@ import org.transdroid.daemon.OS; @@ -31,8 +30,6 @@ import org.transdroid.daemon.OS;
*/
public class DediseedboxSettings extends SeedboxSettingsImpl implements SeedboxSettings {
private EditTextPreference excludeFilter, includeFilter;
@Override
public String getName() {
return "Dediseedbox";

6
app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettingsActivity.java

@ -21,8 +21,9 @@ import android.content.Intent; @@ -21,8 +21,9 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceManager;
import androidx.preference.EditTextPreference;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
@ -30,7 +31,6 @@ import org.androidannotations.annotations.OptionsMenu; @@ -30,7 +31,6 @@ import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.KeyBoundPreferencesActivity;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
import org.transdroid.daemon.Daemon;
/**
* Activity that allows for the configuration of a Dediseedbox seedbox. The key can be supplied to update an

11
app/src/main/java/org/transdroid/core/seedbox/SeedboxPreference.java

@ -16,12 +16,13 @@ @@ -16,12 +16,13 @@
*/
package org.transdroid.core.seedbox;
import android.content.Context;
import androidx.preference.Preference;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.gui.settings.ServerPreference;
import android.content.Context;
import android.preference.Preference;
/**
* Represents a {@link ServerSetting} in a preferences screen, as constructed for a specific {@link SeedboxProvider}.
* @author Eric Kok
@ -91,8 +92,8 @@ public class SeedboxPreference extends ServerPreference { @@ -91,8 +92,8 @@ public class SeedboxPreference extends ServerPreference {
}
public interface OnSeedboxClickedListener {
public void onSeedboxClicked(ServerSetting serverSetting, SeedboxProvider provider,
int onSeedboxClickedListenerOffset);
void onSeedboxClicked(ServerSetting serverSetting, SeedboxProvider provider,
int onSeedboxClickedListenerOffset);
}
}

11
app/src/main/java/org/transdroid/core/seedbox/SeedstuffSettings.java

@ -16,14 +16,13 @@ @@ -16,14 +16,13 @@
*/
package org.transdroid.core.seedbox;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.EditTextPreference;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
/**
* Implementation of {@link SeedboxSettings} for Seedstuff seedboxes.
@ -31,8 +30,6 @@ import android.preference.EditTextPreference; @@ -31,8 +30,6 @@ import android.preference.EditTextPreference;
*/
public class SeedstuffSettings extends SeedboxSettingsImpl implements SeedboxSettings {
private EditTextPreference excludeFilter, includeFilter;
@Override
public String getName() {
return "Seedstuff";

18
app/src/main/java/org/transdroid/core/seedbox/SeedstuffSettingsActivity.java

@ -16,19 +16,21 @@ @@ -16,19 +16,21 @@
*/
package org.transdroid.core.seedbox;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.*;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceManager;
import androidx.preference.EditTextPreference;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.KeyBoundPreferencesActivity;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
/**
* Activity that allows for the configuration of a Seedstuff seedbox. The key can be supplied to update an

18
app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettingsActivity.java

@ -16,19 +16,21 @@ @@ -16,19 +16,21 @@
*/
package org.transdroid.core.seedbox;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.*;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceManager;
import androidx.preference.EditTextPreference;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.KeyBoundPreferencesActivity;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
/**
* Activity that allows for the configuration of a Xirvik dedicated seedbox. The key can be supplied to update an

18
app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettingsActivity.java

@ -16,19 +16,21 @@ @@ -16,19 +16,21 @@
*/
package org.transdroid.core.seedbox;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.*;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceManager;
import androidx.preference.EditTextPreference;
import androidx.preference.PreferenceManager;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.gui.settings.KeyBoundPreferencesActivity;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
/**
* Activity that allows for the configuration of a Xirvik semi-dedicated seedbox. The key can be supplied to update an

6
app/src/main/java/org/transdroid/core/seedbox/XirvikSharedSettingsActivity.java

@ -23,8 +23,9 @@ import android.content.SharedPreferences.Editor; @@ -23,8 +23,9 @@ import android.content.SharedPreferences.Editor;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceManager;
import androidx.preference.EditTextPreference;
import androidx.preference.PreferenceManager;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;
@ -129,7 +130,6 @@ public class XirvikSharedSettingsActivity extends KeyBoundPreferencesActivity { @@ -129,7 +130,6 @@ public class XirvikSharedSettingsActivity extends KeyBoundPreferencesActivity {
}
@SuppressWarnings("deprecation")
protected void storeScgiMountFolder(String result) {
Editor edit = PreferenceManager.getDefaultSharedPreferences(XirvikSharedSettingsActivity.this).edit();
EditTextPreference pref = (EditTextPreference) findPreference("seedbox_xirvikshared_rpc_" + key);

37
app/src/main/res/values-night/styles_transdroid.xml

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- File created by the Android Action Bar Style Generator
Copyright (C) 2012 readyState Software Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="Theme.Transdroid.Auto" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="drawer_background">@color/transdroid_background</item>
<item name="activatable_background">@drawable/activatable_background</item>
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryDark">@color/green_dark</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/grey</item>
<item name="android:textViewStyle">@style/DefaultTextView</item>
<item name="android:windowBackground">@color/transdroid_background</item>
<item name="loading_progress">@drawable/loading_progress</item>
<item name="text_bright">@color/transdroid_text_bright</item>
<item name="text_actionbar">@color/transdroid_text_actionbar</item>
<item name="text_actionbar_secondary">@color/transdroid_text_actionbar</item>
</style>
</resources>

5
app/src/main/res/values/changelog.xml

@ -17,6 +17,11 @@ @@ -17,6 +17,11 @@
-->
<resources>
<string name="system_changelog">
Transdroid 2.5.19\n
- \n
- Dark theme to use black background\n
- Reinstated black widget\n
\n
Transdroid 2.5.18\n
- BitComet details fixes\n
- Settings import/export on Android 10+\n

25
app/src/main/res/values/styles.xml

@ -16,7 +16,30 @@ @@ -16,7 +16,30 @@
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="TransdroidTheme" parent="Theme.Transdroid.Auto">
<style name="TransdroidTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="drawer_background">@color/transdroid_background</item>
<item name="activatable_background">@drawable/activatable_background</item>
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryDark">@color/green_dark</item>
<item name="colorControlHighlight">@color/green_light</item>
<item name="colorAccent">@color/green</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/grey</item>
<item name="android:textViewStyle">@style/DefaultTextView</item>
<item name="android:windowBackground">@color/transdroid_background</item>
<item name="loading_progress">@drawable/loading_progress</item>
<item name="text_bright">@color/transdroid_text_bright</item>
<item name="text_actionbar">@color/transdroid_text_actionbar</item>
<item name="text_actionbar_secondary">@color/transdroid_text_actionbar</item>
</style>
<style name="TransdroidTheme.Settings" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryDark">@color/green_dark</item>
<item name="colorControlHighlight">@color/green_light</item>
<item name="colorAccent">@color/green</item>
<item name="android:windowBackground">@color/transdroid_background</item>
</style>
<!-- No theme background to let the user's wall paper shine through -->

40
app/src/main/res/values/styles_transdroid.xml

@ -1,40 +0,0 @@ @@ -1,40 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- File created by the Android Action Bar Style Generator
Copyright (C) 2011 The Android Open Source Project
Copyright (C) 2012 readyState Software Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<style name="Theme.Transdroid.Auto" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="drawer_background">@color/transdroid_background</item>
<item name="activatable_background">@drawable/activatable_background</item>
<item name="colorPrimary">@color/green</item>
<item name="colorPrimaryDark">@color/green_dark</item>
<item name="colorControlHighlight">@color/green_light</item>
<item name="colorAccent">@color/green_light</item>
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/grey</item>
<item name="android:textViewStyle">@style/DefaultTextView</item>
<item name="android:windowBackground">@color/transdroid_background</item>
<item name="loading_progress">@drawable/loading_progress</item>
<item name="text_bright">@color/transdroid_text_bright</item>
<item name="text_actionbar">@color/transdroid_text_actionbar</item>
<item name="text_actionbar_secondary">@color/transdroid_text_actionbar</item>
</style>
</resources>

42
app/src/main/res/xml/pref_help.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,23 +14,28 @@ @@ -15,23 +14,28 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<Preference
android:key="system_sendlog"
android:title="@string/pref_sendlog"
android:summary="@string/pref_sendlog_info" />
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<Preference
android:key="system_installhelp"
android:title="@string/pref_installhelp"
android:summary="@string/pref_installhelp_info" />
<Preference
android:key="system_changelog"
android:title="@string/pref_changelog" />
<Preference
android:key="system_about" />
<Preference
android:key="system_sendlog"
android:summary="@string/pref_sendlog_info"
android:title="@string/pref_sendlog"
app:iconSpaceReserved="false" />
<Preference
android:key="system_installhelp"
android:summary="@string/pref_installhelp_info"
android:title="@string/pref_installhelp"
app:iconSpaceReserved="false" />
<Preference
android:key="system_changelog"
android:title="@string/pref_changelog"
app:iconSpaceReserved="false" />
<Preference
android:key="system_about"
app:iconSpaceReserved="false" />
</PreferenceScreen>

143
app/src/main/res/xml/pref_main.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,67 +14,81 @@ @@ -15,67 +14,81 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceCategory
android:key="header_servers"
android:title="@string/pref_servers"
android:order="0">
<Preference
android:key="header_addserver"
android:title="@string/pref_addserver"
android:order="98" />
<ListPreference
android:key="header_defaultserver"
android:title="@string/pref_defaultserver"
android:order="99"
android:defaultValue="-2" />
</PreferenceCategory>
<PreferenceCategory
android:key="header_searchsites"
android:title="@string/pref_searchsites"
android:order="100">
<ListPreference
android:key="header_setsearchsite"
android:title="@string/pref_setsearchsite"
android:order="101" />
<Preference
android:key="header_addwebsearch"
android:title="@string/pref_addwebsearch"
android:order="199"/>
</PreferenceCategory>
<PreferenceCategory
android:key="header_rssfeeds"
android:title="@string/pref_rssfeeds"
android:order="200">
<Preference
android:key="header_addrssfeed"
android:title="@string/pref_addrssfeed"
android:order="199"/>
</PreferenceCategory>
<PreferenceCategory
android:key="header_other"
android:title="@string/pref_others"
android:order="300">
<Preference
android:key="header_background"
android:title="@string/pref_background"
android:order="301" />
<Preference
android:key="header_system"
android:title="@string/pref_system"
android:order="302" />
<Preference
android:key="header_help"
android:title="@string/pref_help"
android:order="303" />
<Preference
android:key="header_donate"
android:title="@string/donate_text"
android:order="304" />
</PreferenceCategory>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<PreferenceCategory
android:key="header_servers"
android:order="0"
android:title="@string/pref_servers"
app:iconSpaceReserved="false">
<Preference
android:key="header_addserver"
android:order="98"
android:title="@string/pref_addserver"
app:iconSpaceReserved="false" />
<ListPreference
android:defaultValue="-2"
android:key="header_defaultserver"
android:order="99"
android:title="@string/pref_defaultserver"
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory
android:key="header_searchsites"
android:order="100"
android:title="@string/pref_searchsites"
app:iconSpaceReserved="false">
<ListPreference
android:key="header_setsearchsite"
android:order="101"
android:title="@string/pref_setsearchsite"
app:iconSpaceReserved="false" />
<Preference
android:key="header_addwebsearch"
android:order="199"
android:title="@string/pref_addwebsearch"
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory
android:key="header_rssfeeds"
android:order="200"
android:title="@string/pref_rssfeeds"
app:iconSpaceReserved="false">
<Preference
android:key="header_addrssfeed"
android:order="199"
android:title="@string/pref_addrssfeed"
app:iconSpaceReserved="false" />
</PreferenceCategory>
<PreferenceCategory
android:key="header_other"
android:order="300"
android:title="@string/pref_others"
app:iconSpaceReserved="false">
<Preference
android:key="header_background"
android:order="301"
android:title="@string/pref_background"
app:iconSpaceReserved="false" />
<Preference
android:key="header_system"
android:order="302"
android:title="@string/pref_system"
app:iconSpaceReserved="false" />
<Preference
android:key="header_help"
android:order="303"
android:title="@string/pref_help"
app:iconSpaceReserved="false" />
<Preference
android:key="header_donate"
android:order="304"
android:title="@string/donate_text"
app:iconSpaceReserved="false" />
</PreferenceCategory>
</PreferenceScreen>

100
app/src/main/res/xml/pref_notifications.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,51 +14,56 @@ @@ -15,51 +14,56 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<CheckBoxPreference
android:key="notifications_enabledrss"
android:title="@string/pref_notifications_rss"
android:summary="@string/pref_notifications_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notifications_enabled"
android:title="@string/pref_notifications_torrent"
android:summary="@string/pref_notifications_info"
android:defaultValue="true" />
<ListPreference
android:key="notifications_interval"
android:title="@string/pref_notifyinterval"
android:summary="@string/pref_notifyinterval_info"
android:entries="@array/pref_notifyinterval_types"
android:entryValues="@array/pref_notifyinterval_values"
android:defaultValue="10800" />
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<CheckBoxPreference
android:defaultValue="true"
android:key="notifications_enabledrss"
android:summary="@string/pref_notifications_info"
android:title="@string/pref_notifications_rss"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="true"
android:key="notifications_enabled"
android:summary="@string/pref_notifications_info"
android:title="@string/pref_notifications_torrent"
app:iconSpaceReserved="false" />
<ListPreference
android:defaultValue="10800"
android:entries="@array/pref_notifyinterval_types"
android:entryValues="@array/pref_notifyinterval_values"
android:key="notifications_interval"
android:summary="@string/pref_notifyinterval_info"
android:title="@string/pref_notifyinterval"
app:iconSpaceReserved="false" />
<org.transdroid.core.gui.settings.RingtonePreference
android:key="notifications_sound"
android:title="@string/pref_notifysound"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="notifications_vibrate"
android:title="@string/pref_notifyvibrate"
app:iconSpaceReserved="false" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
alphaSlider="false"
android:defaultValue="@color/ledgreen"
android:key="notifications_ledcolour"
android:summary="@string/pref_notifyled_info"
android:title="@string/pref_notifyled"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="notifications_adwnotify"
android:summary="@string/pref_adw_info"
android:title="@string/pref_adw"
app:iconSpaceReserved="false" />
<RingtonePreference
android:key="notifications_sound"
android:title="@string/pref_notifysound"
android:ringtoneType="notification"
android:showDefault="true"
android:showSilent="true" />
<CheckBoxPreference
android:key="notifications_vibrate"
android:title="@string/pref_notifyvibrate"
android:defaultValue="false" />
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="notifications_ledcolour"
android:title="@string/pref_notifyled"
android:summary="@string/pref_notifyled_info"
android:defaultValue="@color/ledgreen"
alphaSlider="false" />
<CheckBoxPreference
android:key="notifications_adwnotify"
android:title="@string/pref_adw"
android:summary="@string/pref_adw_info"
android:defaultValue="false" />
</PreferenceScreen>

70
app/src/main/res/xml/pref_rssfeed.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,41 +14,48 @@ @@ -15,41 +14,48 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="rssfeed_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="rssfeed_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<EditTextPreference
android:key="rssfeed_url"
android:title="@string/pref_feedurl"
android:inputType="textUri" />
<EditTextPreference
android:inputType="textUri"
android:key="rssfeed_url"
android:title="@string/pref_feedurl"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:key="rssfeed_reqauth"
android:title="@string/pref_reqauth"
android:summary="@string/pref_reqauth_info"
android:defaultValue="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="rssfeed_reqauth"
android:summary="@string/pref_reqauth_info"
android:title="@string/pref_reqauth"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:key="rssfeed_alarmnew"
android:title="@string/pref_alarmrssnew"
android:summary="@string/pref_alarmrssnew_info"
android:defaultValue="true" />
<CheckBoxPreference
android:defaultValue="true"
android:key="rssfeed_alarmnew"
android:summary="@string/pref_alarmrssnew_info"
android:title="@string/pref_alarmrssnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:key="rssfeed_exclude"
android:title="@string/pref_alarmrssexclude"
android:summary="@string/pref_alarmrssexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:inputType="textFilter"
android:key="rssfeed_exclude"
android:summary="@string/pref_alarmrssexclude_info"
android:title="@string/pref_alarmrssexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:key="rssfeed_include"
android:title="@string/pref_alarmrssinclude"
android:summary="@string/pref_alarmrssinclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:inputType="textFilter"
android:key="rssfeed_include"
android:summary="@string/pref_alarmrssinclude_info"
android:title="@string/pref_alarmrssinclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>

96
app/src/main/res/xml/pref_seedbox_dediseedbox.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,48 +14,59 @@ @@ -15,48 +14,59 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="seedbox_dediseedbox_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_dediseedbox_server"
android:title="@string/pref_seedbox_server"
android:summary="@string/pref_seedbox_dediseedboxhint"
android:inputType="textUri" />
<EditTextPreference
android:key="seedbox_dediseedbox_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_dediseedbox_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_dediseedbox_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="seedbox_dediseedbox_server"
android:summary="@string/pref_seedbox_dediseedboxhint"
android:title="@string/pref_seedbox_server"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_dediseedbox_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="seedbox_dediseedbox_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="seedbox_dediseedbox_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="seedbox_dediseedbox_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="seedbox_dediseedbox_alarmexclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="seedbox_dediseedbox_alarminclude"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="seedbox_dediseedbox_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="seedbox_dediseedbox_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_dediseedbox_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_dediseedbox_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>
</PreferenceScreen>

96
app/src/main/res/xml/pref_seedbox_seedstuff.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,48 +14,59 @@ @@ -15,48 +14,59 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="seedbox_seedstuff_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_seedstuff_server"
android:title="@string/pref_seedbox_server"
android:summary="@string/pref_seedbox_seedstuffhint"
android:inputType="textUri" />
<EditTextPreference
android:key="seedbox_seedstuff_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_seedstuff_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_seedstuff_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="seedbox_seedstuff_server"
android:summary="@string/pref_seedbox_seedstuffhint"
android:title="@string/pref_seedbox_server"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_seedstuff_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="seedbox_seedstuff_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="seedbox_seedstuff_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="seedbox_seedstuff_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="seedbox_seedstuff_alarmexclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="seedbox_seedstuff_alarminclude"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="seedbox_seedstuff_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="seedbox_seedstuff_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_seedstuff_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_seedstuff_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>
</PreferenceScreen>

109
app/src/main/res/xml/pref_seedbox_xirvikdedi.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,54 +14,66 @@ @@ -15,54 +14,66 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="seedbox_xirvikdedi_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<ListPreference
android:key="seedbox_xirvikdedi_client"
android:title="@string/pref_seedbox_client"
android:summary="@string/pref_seedbox_client_info"
android:entries="@array/pref_seedbox_xirvikclients"
android:entryValues="@array/pref_seedbox_xirviktypes" />
<EditTextPreference
android:key="seedbox_xirvikdedi_server"
android:title="@string/pref_seedbox_server"
android:summary="@string/pref_seedbox_xirvikhint"
android:inputType="textUri" />
<EditTextPreference
android:key="seedbox_xirvikdedi_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_xirvikdedi_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirvikdedi_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<ListPreference
android:entries="@array/pref_seedbox_xirvikclients"
android:entryValues="@array/pref_seedbox_xirviktypes"
android:key="seedbox_xirvikdedi_client"
android:summary="@string/pref_seedbox_client_info"
android:title="@string/pref_seedbox_client"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="seedbox_xirvikdedi_server"
android:summary="@string/pref_seedbox_xirvikhint"
android:title="@string/pref_seedbox_server"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirvikdedi_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="seedbox_xirvikdedi_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="seedbox_xirvikdedi_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="seedbox_xirvikdedi_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="seedbox_xirvikdedi_alarmexclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="seedbox_xirvikdedi_alarminclude"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="seedbox_xirvikdedi_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="seedbox_xirvikdedi_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirvikdedi_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirvikdedi_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>
</PreferenceScreen>

96
app/src/main/res/xml/pref_seedbox_xirviksemi.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,48 +14,59 @@ @@ -15,48 +14,59 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="seedbox_xirviksemi_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_xirviksemi_server"
android:title="@string/pref_seedbox_server"
android:summary="@string/pref_seedbox_xirvikhint2"
android:inputType="textUri" />
<EditTextPreference
android:key="seedbox_xirviksemi_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_xirviksemi_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirviksemi_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="seedbox_xirviksemi_server"
android:summary="@string/pref_seedbox_xirvikhint2"
android:title="@string/pref_seedbox_server"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirviksemi_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="seedbox_xirviksemi_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="seedbox_xirviksemi_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="seedbox_xirviksemi_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="seedbox_xirviksemi_alarmexclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="seedbox_xirviksemi_alarminclude"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="seedbox_xirviksemi_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="seedbox_xirviksemi_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirviksemi_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirviksemi_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>
</PreferenceScreen>

105
app/src/main/res/xml/pref_seedbox_xirvikshared.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -15,52 +14,64 @@ @@ -15,52 +14,64 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="seedbox_xirvikshared_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_xirvikshared_server"
android:title="@string/pref_seedbox_server"
android:summary="@string/pref_seedbox_xirvikhint2"
android:inputType="textUri" />
<EditTextPreference
android:key="seedbox_xirvikshared_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="seedbox_xirvikshared_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:key="seedbox_xirvikshared_rpc"
android:title="@string/pref_folder"
android:enabled="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirvikshared_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="seedbox_xirvikshared_server"
android:summary="@string/pref_seedbox_xirvikhint2"
android:title="@string/pref_seedbox_server"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="seedbox_xirvikshared_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="seedbox_xirvikshared_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<EditTextPreference
android:enabled="false"
android:key="seedbox_xirvikshared_rpc"
android:title="@string/pref_folder"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="seedbox_xirvikshared_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="seedbox_xirvikshared_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="seedbox_xirvikshared_alarmexclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="seedbox_xirvikshared_alarminclude"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="seedbox_xirvikshared_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="seedbox_xirvikshared_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirvikshared_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="seedbox_xirvikshared_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
</PreferenceScreen>
</PreferenceScreen>

288
app/src/main/res/xml/pref_server.xml

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright 2010-2018 Eric Kok et al.
Transdroid is free software: you can redistribute it and/or modify
@ -16,135 +15,164 @@ @@ -16,135 +15,164 @@
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" >
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="server_name"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<ListPreference
android:key="server_type"
android:title="@string/pref_servertype"
android:entries="@array/pref_daemon_types"
android:entryValues="@array/pref_daemon_values" />
<EditTextPreference
android:key="server_address"
android:title="@string/pref_address"
android:inputType="textUri" />
<EditTextPreference
android:key="server_user"
android:title="@string/pref_user"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="server_pass"
android:title="@string/pref_pass"
android:inputType="textPassword" />
<EditTextPreference
android:key="server_extrapass"
android:title="@string/pref_extrapassword"
android:inputType="textPassword" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="server_name"
android:summary="@string/pref_name_optional"
android:title="@string/pref_name"
app:iconSpaceReserved="false" />
<ListPreference
android:entries="@array/pref_daemon_types"
android:entryValues="@array/pref_daemon_values"
android:key="server_type"
android:title="@string/pref_servertype"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="server_address"
android:title="@string/pref_address"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textNoSuggestions"
android:key="server_user"
android:title="@string/pref_user"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="server_pass"
android:title="@string/pref_pass"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="server_extrapass"
android:title="@string/pref_extrapassword"
app:iconSpaceReserved="false" />
<PreferenceScreen android:title="@string/pref_advanced" >
<EditTextPreference
android:key="server_port"
android:title="@string/pref_port"
android:inputType="numberSigned" />
<org.transdroid.core.gui.settings.InterceptableEditTextPreference
android:key="server_localnetwork"
android:title="@string/pref_localnetwork"
android:summary="@string/pref_localnetwork_info"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="server_localaddress"
android:title="@string/pref_localaddress"
android:summary="@string/pref_localaddress_info"
android:inputType="textUri" />
<EditTextPreference
android:key="server_localport"
android:title="@string/pref_localport"
android:summary="@string/pref_localaddress_info"
android:inputType="numberSigned" />
<CheckBoxPreference
android:key="server_disableauth"
android:title="@string/pref_disableauth"
android:summary="@string/pref_disableauth_info"
android:defaultValue="false" />
<EditTextPreference
android:key="server_folder"
android:title="@string/pref_folder"
android:summary="@string/pref_folder_info"
android:inputType="textUri" />
<EditTextPreference
android:key="server_timeout"
android:title="@string/pref_timeout"
android:summary="@string/pref_timeout_info"
android:inputType="numberSigned" />
<CheckBoxPreference
android:key="server_sslenabled"
android:title="@string/pref_sslenable"
android:summary="@string/pref_sslenable_info"
android:defaultValue="false" />
<CheckBoxPreference
android:key="server_localsslenabled"
android:title="@string/pref_local_sslenable"
android:summary="@string/pref_local_sslenable_info"
android:defaultValue="false" />
<CheckBoxPreference
android:key="server_ssltrustall"
android:title="@string/pref_sslacceptall"
android:summary="@string/pref_sslacceptall_info"
android:defaultValue="false"
android:dependency="server_sslenabled" />
<EditTextPreference
android:key="server_ssltrustkey"
android:title="@string/pref_sslkey"
android:summary="@string/pref_sslkey_info"
android:inputType="textNoSuggestions"
android:dependency="server_sslenabled" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_advanced"
app:iconSpaceReserved="false">
<EditTextPreference
android:inputType="numberSigned"
android:key="server_port"
android:title="@string/pref_port"
app:iconSpaceReserved="false" />
<org.transdroid.core.gui.settings.InterceptableEditTextPreference
android:inputType="textNoSuggestions"
android:key="server_localnetwork"
android:summary="@string/pref_localnetwork_info"
android:title="@string/pref_localnetwork"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="server_localaddress"
android:summary="@string/pref_localaddress_info"
android:title="@string/pref_localaddress"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="numberSigned"
android:key="server_localport"
android:summary="@string/pref_localaddress_info"
android:title="@string/pref_localport"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="server_disableauth"
android:summary="@string/pref_disableauth_info"
android:title="@string/pref_disableauth"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="server_folder"
android:summary="@string/pref_folder_info"
android:title="@string/pref_folder"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="numberSigned"
android:key="server_timeout"
android:summary="@string/pref_timeout_info"
android:title="@string/pref_timeout"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="server_sslenabled"
android:summary="@string/pref_sslenable_info"
android:title="@string/pref_sslenable"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="server_localsslenabled"
android:summary="@string/pref_local_sslenable_info"
android:title="@string/pref_local_sslenable"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:dependency="server_sslenabled"
android:key="server_ssltrustall"
android:summary="@string/pref_sslacceptall_info"
android:title="@string/pref_sslacceptall"
app:iconSpaceReserved="false" />
<EditTextPreference
android:dependency="server_sslenabled"
android:inputType="textNoSuggestions"
android:key="server_ssltrustkey"
android:summary="@string/pref_sslkey_info"
android:title="@string/pref_sslkey"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceScreen
android:title="@string/pref_optional"
app:iconSpaceReserved="false">
<CheckBoxPreference
android:defaultValue="true"
android:key="server_alarmfinished"
android:summary="@string/pref_alarmdone_info"
android:title="@string/pref_alarmdone"
app:iconSpaceReserved="false" />
<CheckBoxPreference
android:defaultValue="false"
android:key="server_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:title="@string/pref_alarmnew"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="server_exclude"
android:summary="@string/pref_alarmexclude_info"
android:title="@string/pref_alarmexclude"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textFilter"
android:key="server_include"
android:summary="@string/pref_alarminclude_info"
android:title="@string/pref_alarminclude"
app:iconSpaceReserved="false" />
<ListPreference
android:defaultValue="type_linux"
android:entries="@array/pref_os_types"
android:entryValues="@array/pref_os_values"
android:key="server_os"
android:title="@string/pref_os"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="server_downloaddir"
android:summary="@string/pref_downdir_info"
android:title="@string/pref_downdir"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textUri"
android:key="server_ftpurl"
android:summary="@string/pref_ftpurl_info"
android:title="@string/pref_ftpurl"
app:iconSpaceReserved="false" />
<EditTextPreference
android:inputType="textPassword"
android:key="server_ftppass"
android:title="@string/pref_ftppass"
app:iconSpaceReserved="false" />
</PreferenceScreen>
<PreferenceScreen android:title="@string/pref_optional" >
<CheckBoxPreference
android:key="server_alarmfinished"
android:title="@string/pref_alarmdone"
android:summary="@string/pref_alarmdone_info"
android:defaultValue="true" />
<CheckBoxPreference
android:key="server_alarmnew"
android:title="@string/pref_alarmnew"
android:summary="@string/pref_alarmnew_info"
android:defaultValue="false" />
<EditTextPreference
android:key="server_exclude"
android:title="@string/pref_alarmexclude"
android:summary="@string/pref_alarmexclude_info"
android:inputType="textFilter" />
<EditTextPreference
android:key="server_include"
android:title="@string/pref_alarminclude"
android:summary="@string/pref_alarminclude_info"
android:inputType="textFilter" />
<ListPreference
android:key="server_os"
android:title="@string/pref_os"
android:entries="@array/pref_os_types"
android:entryValues="@array/pref_os_values"
android:defaultValue="type_linux" />
<EditTextPreference
android:key="server_downloaddir"
android:title="@string/pref_downdir"
android:summary="@string/pref_downdir_info"
android:inputType="textUri" />
<EditTextPreference
android:key="server_ftpurl"
android:title="@string/pref_ftpurl"
android:summary="@string/pref_ftpurl_info"
android:inputType="textUri" />
<EditTextPreference
android:key="server_ftppass"
android:title="@string/pref_ftppass"
android:inputType="textPassword" />
</PreferenceScreen>
</PreferenceScreen>

11
app/src/main/res/xml/pref_system.xml

@ -15,16 +15,19 @@ @@ -15,16 +15,19 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<CheckBoxPreference
android:key="system_dormantasinactive"
app:iconSpaceReserved="false"
android:title="@string/pref_dormantasinactive"
android:summary="@string/pref_dormantasinactive_info"
android:defaultValue="false" />
<ListPreference
android:key="system_autorefresh"
app:iconSpaceReserved="false"
android:title="@string/pref_autorefresh"
android:summary="@string/pref_autorefresh_info"
android:entries="@array/pref_autorefresh_intervals"
@ -33,6 +36,7 @@ @@ -33,6 +36,7 @@
<CheckBoxPreference
android:key="system_autodarktheme"
app:iconSpaceReserved="false"
android:title="@string/pref_autodarktheme"
android:summary="@string/pref_autodarktheme_info"
android:disableDependentsState="true"
@ -42,25 +46,30 @@ @@ -42,25 +46,30 @@
android:key="system_usedarktheme"
android:dependency="system_autodarktheme"
android:title="@string/pref_usedarktheme"
app:iconSpaceReserved="false"
android:summary="@string/pref_usedarktheme_info"
android:defaultValue="false" />
<CheckBoxPreference
android:key="system_checkupdates"
android:title="@string/pref_checkupdates"
app:iconSpaceReserved="false"
android:summary="@string/pref_checkupdates_info"
android:defaultValue="true" />
<Preference
android:key="system_clearsearch"
app:iconSpaceReserved="false"
android:title="@string/pref_clearsearch" />
<Preference
android:key="system_importsettings"
app:iconSpaceReserved="false"
android:title="@string/pref_import" />
<Preference
android:key="system_exportsettings"
app:iconSpaceReserved="false"
android:title="@string/pref_export" />
</PreferenceScreen>

6
app/src/main/res/xml/pref_websearch.xml

@ -15,22 +15,26 @@ @@ -15,22 +15,26 @@
You should have received a copy of the GNU General Public License
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<EditTextPreference
android:key="websearch_name"
app:iconSpaceReserved="false"
android:title="@string/pref_name"
android:summary="@string/pref_name_optional"
android:inputType="textNoSuggestions" />
<EditTextPreference
android:key="websearch_baseurl"
app:iconSpaceReserved="false"
android:title="@string/pref_searchurl"
android:summary="@string/pref_searchurl_info"
android:inputType="textUri" />
<EditTextPreference
android:key="websearch_cookies"
app:iconSpaceReserved="false"
android:title="@string/pref_cookies"
android:summary="@string/pref_cookies_info"
android:inputType="textUri" />

Loading…
Cancel
Save