Removed integrations screen with only one item
This commit is contained in:
parent
b195e32c04
commit
5bfb68382b
|
@ -17,7 +17,6 @@ import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||||
import de.danoeh.antennapod.fragment.preferences.AutoDownloadPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.AutoDownloadPreferencesFragment;
|
||||||
import de.danoeh.antennapod.fragment.preferences.GpodderPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.GpodderPreferencesFragment;
|
||||||
import de.danoeh.antennapod.fragment.preferences.ImportExportPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.ImportExportPreferencesFragment;
|
||||||
import de.danoeh.antennapod.fragment.preferences.IntegrationsPreferencesFragment;
|
|
||||||
import de.danoeh.antennapod.fragment.preferences.MainPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.MainPreferencesFragment;
|
||||||
import de.danoeh.antennapod.fragment.preferences.NetworkPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.NetworkPreferencesFragment;
|
||||||
import de.danoeh.antennapod.fragment.preferences.PlaybackPreferencesFragment;
|
import de.danoeh.antennapod.fragment.preferences.PlaybackPreferencesFragment;
|
||||||
|
@ -54,8 +53,6 @@ public class PreferenceActivity extends AppCompatActivity implements SearchPrefe
|
||||||
|
|
||||||
if (screen == R.xml.preferences_user_interface) {
|
if (screen == R.xml.preferences_user_interface) {
|
||||||
prefFragment = new UserInterfacePreferencesFragment();
|
prefFragment = new UserInterfacePreferencesFragment();
|
||||||
} else if (screen == R.xml.preferences_integrations) {
|
|
||||||
prefFragment = new IntegrationsPreferencesFragment();
|
|
||||||
} else if (screen == R.xml.preferences_network) {
|
} else if (screen == R.xml.preferences_network) {
|
||||||
prefFragment = new NetworkPreferencesFragment();
|
prefFragment = new NetworkPreferencesFragment();
|
||||||
} else if (screen == R.xml.preferences_storage) {
|
} else if (screen == R.xml.preferences_storage) {
|
||||||
|
@ -86,8 +83,6 @@ public class PreferenceActivity extends AppCompatActivity implements SearchPrefe
|
||||||
return R.string.import_export_pref;
|
return R.string.import_export_pref;
|
||||||
case R.xml.preferences_user_interface:
|
case R.xml.preferences_user_interface:
|
||||||
return R.string.user_interface_label;
|
return R.string.user_interface_label;
|
||||||
case R.xml.preferences_integrations:
|
|
||||||
return R.string.integrations_label;
|
|
||||||
case R.xml.preferences_gpodder:
|
case R.xml.preferences_gpodder:
|
||||||
return R.string.gpodnet_main_label;
|
return R.string.gpodnet_main_label;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
package de.danoeh.antennapod.fragment.preferences;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import androidx.preference.PreferenceFragmentCompat;
|
|
||||||
import de.danoeh.antennapod.R;
|
|
||||||
import de.danoeh.antennapod.activity.PreferenceActivity;
|
|
||||||
|
|
||||||
public class IntegrationsPreferencesFragment extends PreferenceFragmentCompat {
|
|
||||||
private static final String PREF_SCREEN_GPODDER = "prefGpodderSettings";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
|
||||||
addPreferencesFromResource(R.xml.preferences_integrations);
|
|
||||||
setupIntegrationsScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
((PreferenceActivity) getActivity()).getSupportActionBar().setTitle(R.string.integrations_label);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupIntegrationsScreen() {
|
|
||||||
findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> {
|
|
||||||
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -17,7 +17,7 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
private static final String PREF_SCREEN_USER_INTERFACE = "prefScreenInterface";
|
private static final String PREF_SCREEN_USER_INTERFACE = "prefScreenInterface";
|
||||||
private static final String PREF_SCREEN_PLAYBACK = "prefScreenPlayback";
|
private static final String PREF_SCREEN_PLAYBACK = "prefScreenPlayback";
|
||||||
private static final String PREF_SCREEN_NETWORK = "prefScreenNetwork";
|
private static final String PREF_SCREEN_NETWORK = "prefScreenNetwork";
|
||||||
private static final String PREF_SCREEN_INTEGRATIONS = "prefScreenIntegrations";
|
private static final String PREF_SCREEN_GPODDER = "prefScreenGpodder";
|
||||||
private static final String PREF_SCREEN_STORAGE = "prefScreenStorage";
|
private static final String PREF_SCREEN_STORAGE = "prefScreenStorage";
|
||||||
private static final String PREF_FAQ = "prefFaq";
|
private static final String PREF_FAQ = "prefFaq";
|
||||||
private static final String PREF_VIEW_MAILING_LIST = "prefViewMailingList";
|
private static final String PREF_VIEW_MAILING_LIST = "prefViewMailingList";
|
||||||
|
@ -51,8 +51,8 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_network);
|
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_network);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
findPreference(PREF_SCREEN_INTEGRATIONS).setOnPreferenceClickListener(preference -> {
|
findPreference(PREF_SCREEN_GPODDER).setOnPreferenceClickListener(preference -> {
|
||||||
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_integrations);
|
((PreferenceActivity) getActivity()).openScreen(R.xml.preferences_gpodder);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
findPreference(PREF_SCREEN_STORAGE).setOnPreferenceClickListener(preference -> {
|
findPreference(PREF_SCREEN_STORAGE).setOnPreferenceClickListener(preference -> {
|
||||||
|
@ -89,7 +89,7 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupSearch() {
|
private void setupSearch() {
|
||||||
SearchPreference searchPreference = (SearchPreference) findPreference("searchPreference");
|
SearchPreference searchPreference = findPreference("searchPreference");
|
||||||
SearchConfiguration config = searchPreference.getSearchConfiguration();
|
SearchConfiguration config = searchPreference.getSearchConfiguration();
|
||||||
config.setActivity((AppCompatActivity) getActivity());
|
config.setActivity((AppCompatActivity) getActivity());
|
||||||
config.setFragmentContainerViewId(R.id.content);
|
config.setFragmentContainerViewId(R.id.content);
|
||||||
|
@ -111,7 +111,6 @@ public class MainPreferencesFragment extends PreferenceFragmentCompat {
|
||||||
.addBreadcrumb(R.string.automation)
|
.addBreadcrumb(R.string.automation)
|
||||||
.addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_autodownload));
|
.addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_autodownload));
|
||||||
config.index(R.xml.preferences_gpodder)
|
config.index(R.xml.preferences_gpodder)
|
||||||
.addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_integrations))
|
|
||||||
.addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_gpodder));
|
.addBreadcrumb(PreferenceActivity.getTitleOfPage(R.xml.preferences_gpodder));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,9 @@
|
||||||
android:icon="?attr/ic_network" />
|
android:icon="?attr/ic_network" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="prefScreenIntegrations"
|
android:key="prefScreenGpodder"
|
||||||
android:title="@string/integrations_label"
|
android:title="@string/synchronization_pref"
|
||||||
android:summary="@string/integrations_sum"
|
android:summary="@string/synchronization_sum"
|
||||||
android:icon="?attr/ic_unfav" />
|
android:icon="?attr/ic_unfav" />
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<PreferenceScreen
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<Preference
|
|
||||||
android:key="prefGpodderSettings"
|
|
||||||
android:title="@string/gpodnet_main_label"
|
|
||||||
app:icon="@drawable/gpodder_icon"
|
|
||||||
android:summary="@string/gpodnet_summary" />
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
|
|
@ -25,7 +25,6 @@
|
||||||
<string name="cancel_download_label">Cancel\nDownload</string>
|
<string name="cancel_download_label">Cancel\nDownload</string>
|
||||||
<string name="playback_history_label">Playback History</string>
|
<string name="playback_history_label">Playback History</string>
|
||||||
<string name="gpodnet_main_label">gpodder.net</string>
|
<string name="gpodnet_main_label">gpodder.net</string>
|
||||||
<string name="gpodnet_summary">Synchronize with other devices</string>
|
|
||||||
<string name="gpodnet_auth_label">gpodder.net Login</string>
|
<string name="gpodnet_auth_label">gpodder.net Login</string>
|
||||||
<string name="episode_cache_full_title">Episode cache full</string>
|
<string name="episode_cache_full_title">Episode cache full</string>
|
||||||
<string name="episode_cache_full_message">The episode cache limit has been reached. You can increase the cache size in the Settings.</string>
|
<string name="episode_cache_full_message">The episode cache limit has been reached. You can increase the cache size in the Settings.</string>
|
||||||
|
@ -345,8 +344,8 @@
|
||||||
<string name="storage_sum">Episode auto delete, Import, Export</string>
|
<string name="storage_sum">Episode auto delete, Import, Export</string>
|
||||||
<string name="project_pref">Project</string>
|
<string name="project_pref">Project</string>
|
||||||
<string name="queue_label">Queue</string>
|
<string name="queue_label">Queue</string>
|
||||||
<string name="integrations_label">Integrations</string>
|
<string name="synchronization_pref">Synchronization</string>
|
||||||
<string name="integrations_sum">Synchronization</string>
|
<string name="synchronization_sum">Synchronize with other devices using gpodder.net</string>
|
||||||
<string name="automation">Automation</string>
|
<string name="automation">Automation</string>
|
||||||
<string name="download_pref_details">Details</string>
|
<string name="download_pref_details">Details</string>
|
||||||
<string name="import_export_pref">Import/Export</string>
|
<string name="import_export_pref">Import/Export</string>
|
||||||
|
|
Loading…
Reference in New Issue