More adjustments to settings page

pull/14/head
Sam Bosley 13 years ago
parent c574d3a51e
commit e256017e86

@ -309,8 +309,10 @@
<!-- account types -->
<string name="actfm_account_type">Account Type</string>
<string name="actfm_account_info">Account Info</string>
<string name="actfm_account_info_summary">Status and options</string>
<string name="account_type_title_not_logged_in">Sign up for a free account</string>
<string name="account_type_summary_not_logged_in">Access tasks online, share lists and even delegate</string>
<string name="account_type_summary_not_logged_in">Access tasks online, share lists and delegate</string>
<string name="actfm_account_premium">Premium</string>

@ -582,9 +582,6 @@
<!-- Account status preference (%s -> account type) -->
<string name="EPr_account_title">Account: %s</string>
<!-- Account status description -->
<string name="EPr_account_desc">Cloud sync status and options</string>
<!-- Support preferences summary -->
<string name="EPr_support_summary">Tutorial, FAQ, About Astrid</string>

@ -10,7 +10,7 @@
<PreferenceScreen android:title="@string/EPr_account_title"
android:key="@string/p_account"
android:summary="@string/EPr_account_desc"/>
android:summary="@string/actfm_account_info_summary"/>
<PreferenceScreen android:title="@string/p_help" android:summary="@string/EPr_support_summary">
<PreferenceScreen android:title="@string/p_about" android:key="@string/p_about" />

@ -17,23 +17,6 @@
android:title="@string/actfm_inapp_billing"
android:summary="@string/actfm_inapp_billing_summary"/>
<PreferenceCategory
android:key="@string/sync_SPr_group_status"
android:title="@string/sync_SPr_group_status">
<com.todoroo.astrid.ui.MultilinePreference
android:layout="@layout/status_preference"
android:key="@string/sync_SPr_status_key"
android:textSize="24sp"
android:gravity="center"/>
<com.todoroo.astrid.ui.MultilinePreference
android:key="@string/sync_SPr_key_last_error"
android:textSize="24sp"
android:gravity="center"/>
</PreferenceCategory>
<PreferenceCategory
android:key="@string/sync_SPr_key_options"
android:title="@string/sync_SPr_group_options">
@ -55,5 +38,22 @@
android:summary="@string/sync_SPr_forget_description" />
</PreferenceCategory>
<PreferenceCategory
android:key="@string/sync_SPr_group_status"
android:title="@string/sync_SPr_group_status">
<com.todoroo.astrid.ui.MultilinePreference
android:layout="@layout/status_preference"
android:key="@string/sync_SPr_status_key"
android:textSize="24sp"
android:gravity="center"/>
<com.todoroo.astrid.ui.MultilinePreference
android:key="@string/sync_SPr_key_last_error"
android:textSize="24sp"
android:gravity="center"/>
</PreferenceCategory>
</PreferenceScreen>

@ -270,9 +270,14 @@ public class EditPreferences extends TodorooPreferenceActivity {
}
private void showAccountPrefs() {
Intent intent = new Intent(this, ActFmPreferences.class);
intent.setAction(AstridApiConstants.ACTION_SETTINGS);
startActivityForResult(intent, REQUEST_CODE_SYNC);
if (actFmPreferenceService.isLoggedIn()) {
Intent intent = new Intent(this, ActFmPreferences.class);
intent.setAction(AstridApiConstants.ACTION_SETTINGS);
startActivityForResult(intent, REQUEST_CODE_SYNC);
} else {
Intent intent = new Intent(this, ActFmLoginActivity.class);
startActivity(intent);
}
}
private static final HashMap<Class<?>, Integer> PREFERENCE_REQUEST_CODES = new HashMap<Class<?>, Integer>();
@ -433,15 +438,17 @@ public class EditPreferences extends TodorooPreferenceActivity {
final Resources r = getResources();
if (r.getString(R.string.p_account).equals(preference.getKey())) {
String accountType;
if (ActFmPreferenceService.isPremiumUser()) {
accountType = getString(R.string.actfm_account_premium);
} else if (actFmPreferenceService.isLoggedIn()) {
accountType = getString(R.string.actfm_account_basic);
int title;
int summary;
if (ActFmPreferenceService.isPremiumUser() || actFmPreferenceService.isLoggedIn()) {
title = R.string.actfm_account_info;
summary = R.string.actfm_account_info_summary;
} else {
accountType = getString(R.string.actfm_account_none);
title = R.string.account_type_title_not_logged_in;
summary = R.string.account_type_summary_not_logged_in;
}
preference.setTitle(getString(R.string.EPr_account_title, accountType));
preference.setTitle(title);
preference.setSummary(summary);
} else if (r.getString(R.string.p_showNotes).equals(preference.getKey())) {
if (value != null && !(Boolean)value)
preference.setSummary(R.string.EPr_showNotes_desc_disabled);

Loading…
Cancel
Save