Rename general settings category to network

This commit is contained in:
str4d
2015-05-29 09:15:43 +00:00
parent 992564f883
commit f713394be2
5 changed files with 14 additions and 15 deletions

View File

@@ -11,18 +11,18 @@ import i2p.bote.Configuration;
import i2p.bote.I2PBote;
import i2p.bote.android.R;
public class GeneralPreferenceFragment extends PreferenceFragment {
public class NetworkPreferenceFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
addPreferencesFromResource(R.xml.settings_general);
addPreferencesFromResource(R.xml.settings_network);
}
@Override
public void onResume() {
super.onResume();
//noinspection ConstantConditions
((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.pref_title_general);
((SettingsActivity) getActivity()).getSupportActionBar().setTitle(R.string.settings_label_network);
}
@Override

View File

@@ -19,7 +19,7 @@ import i2p.bote.android.service.BoteService;
public class SettingsActivity extends BoteActivityBase implements
SharedPreferences.OnSharedPreferenceChangeListener {
public static final String PREFERENCE_CATEGORY = "preference_category";
public static final String PREFERENCE_CATEGORY_GENERAL = "preference_category_general";
public static final String PREFERENCE_CATEGORY_NETWORK = "preference_category_network";
public static final String PREFERENCE_CATEGORY_IDENTITIES = "preference_category_identities";
public static final String PREFERENCE_CATEGORY_PRIVACY = "preference_category_privacy";
public static final String PREFERENCE_CATEGORY_APP_PROTECTION = "preference_category_app_protection";
@@ -88,8 +88,8 @@ public class SettingsActivity extends BoteActivityBase implements
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.settings);
findPreference(PREFERENCE_CATEGORY_GENERAL)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_GENERAL));
findPreference(PREFERENCE_CATEGORY_NETWORK)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_NETWORK));
findPreference(PREFERENCE_CATEGORY_IDENTITIES)
.setOnPreferenceClickListener(new CategoryClickListener(PREFERENCE_CATEGORY_IDENTITIES));
findPreference(PREFERENCE_CATEGORY_PRIVACY)
@@ -139,8 +139,8 @@ public class SettingsActivity extends BoteActivityBase implements
private static Fragment getFragmentForCategory(String category) {
switch (category) {
case PREFERENCE_CATEGORY_GENERAL:
return new GeneralPreferenceFragment();
case PREFERENCE_CATEGORY_NETWORK:
return new NetworkPreferenceFragment();
case PREFERENCE_CATEGORY_PRIVACY:
return new PrivacyPreferenceFragment();
case PREFERENCE_CATEGORY_APP_PROTECTION:

View File

@@ -179,8 +179,7 @@
<string name="also_check_i2p_android">If that doesn\'t help, check that I2P is running. You can see I2P\'s current status in the notification drawer, or by opening the I2P app. If it isn\'t running properly, restart I2P (in the app, click "Stop", and then click "Start" when it appears). Wait for I2P to be fully running, and then start Bote.</string>
<string name="bote_connection_error">Bote connection error</string>
<string name="full_error_copied_to_clipboard">Full error copied to clipboard</string>
<string name="pref_title_general">General</string>
<string name="pref_summ_general">General settings and default identity settings</string>
<string name="settings_label_network">Network</string>
<string name="pref_title_autoMail">Auto-check mail</string>
<string name="pref_title_checkInterval">Check interval</string>
<string name="pref_summ_checkInterval">%s minutes</string>

View File

@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<Preference
android:key="preference_category_general"
android:title="@string/pref_title_general"/>
android:key="preference_category_network"
android:title="@string/settings_label_network"/>
<Preference
android:key="preference_category_identities"
android:title="@string/pref_title_identities"/>
<Preference
android:key="preference_category_privacy"
android:title="@string/pref_title_privacy" />
android:title="@string/pref_title_privacy"/>
<Preference
android:key="preference_category_app_protection"
android:title="@string/settings_label_app_protection"/>
<Preference
android:key="preference_category_appearance"
android:title="@string/settings_label_appearance" />
android:title="@string/settings_label_appearance"/>
<Preference
android:key="preference_category_advanced"
android:title="@string/settings_label_advanced" />
android:title="@string/settings_label_advanced"/>
</PreferenceScreen>