mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-23 09:52:16 -05:00
Moving more composition preferences to the Composition settings page
This commit is contained in:
parent
a49fc1c0a0
commit
3962145185
@ -9,16 +9,30 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical">
|
||||
<TextView
|
||||
android:text="@string/account_settings_email_label"
|
||||
android:text="@string/account_settings_name_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary" />
|
||||
<EditText
|
||||
android:id="@+id/account_name"
|
||||
android:singleLine="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
/>
|
||||
<TextView
|
||||
android:text="@string/account_settings_email_label"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
/>
|
||||
<EditText
|
||||
android:id="@+id/account_email"
|
||||
android:singleLine="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
android:layout_width="fill_parent"
|
||||
/>
|
||||
<TextView
|
||||
android:text="@string/account_settings_always_bcc_label"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -203,10 +203,11 @@
|
||||
<string name="account_setup_failed_dlg_edit_details_action">Edit details</string>
|
||||
|
||||
<string name="account_settings_title_fmt">General settings</string>
|
||||
<string name="account_settings_default">Default account</string>
|
||||
<string name="account_settings_default_label">Default account</string>
|
||||
<string name="account_settings_default_summary">Send email from this account by default</string>
|
||||
<string name="account_settings_notify_label">Email notifications</string>
|
||||
<string name="account_settings_email_label">Email address</string>
|
||||
<string name="account_settings_email_label">Your email address</string>
|
||||
<string name="account_settings_notify_summary">Notify in status bar when email arrives</string>
|
||||
<string name="account_settings_show_combined_label">Show combined Inbox</string>
|
||||
<string name="account_settings_mail_check_frequency_label">Email check frequency</string>
|
||||
@ -227,7 +228,7 @@
|
||||
<string name="account_settings_composition_label">Composing messages</string>
|
||||
|
||||
|
||||
<string name="account_settings_always_bcc_label">Always Bcc address</string>
|
||||
<string name="account_settings_always_bcc_label">Bcc all messages to</string>
|
||||
<string name="account_settings_always_bcc_summary">Send this address a copy of every outgoing message</string>
|
||||
|
||||
|
||||
|
@ -21,16 +21,11 @@
|
||||
|
||||
<EditTextPreference
|
||||
android:key="account_description"
|
||||
android:singleLine="true"
|
||||
android:title="@string/account_settings_description_label"
|
||||
android:summary=""
|
||||
android:dialogTitle="@string/account_settings_description_label" />
|
||||
|
||||
<EditTextPreference
|
||||
android:key="account_name"
|
||||
android:title="@string/account_settings_name_label"
|
||||
android:summary=""
|
||||
android:dialogTitle="@string/account_settings_name_label" />
|
||||
|
||||
<ListPreference
|
||||
android:key="account_check_frequency"
|
||||
android:title="@string/account_settings_mail_check_frequency_label"
|
||||
@ -38,10 +33,6 @@
|
||||
android:entryValues="@array/account_settings_check_frequency_values"
|
||||
android:dialogTitle="@string/account_settings_mail_check_frequency_label" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="account_default"
|
||||
android:title="@string/account_settings_default_label"
|
||||
android:summary="@string/account_settings_default_summary" />
|
||||
|
||||
<PreferenceScreen
|
||||
android:key="composition"
|
||||
@ -87,4 +78,13 @@
|
||||
android:title="@string/account_settings_outgoing_label" />
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/account_settings_default">
|
||||
<CheckBoxPreference
|
||||
android:key="account_default"
|
||||
android:title="@string/account_settings_default_label"
|
||||
android:summary="@string/account_settings_default_summary" />
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@ -91,113 +91,116 @@ public final class R {
|
||||
public static final int text_box_light=0x7f020043;
|
||||
}
|
||||
public static final class id {
|
||||
public static final int account_always_bcc=0x7f0a000a;
|
||||
public static final int account_check_frequency=0x7f0a0018;
|
||||
public static final int account_always_bcc=0x7f0a000b;
|
||||
public static final int account_check_frequency=0x7f0a001a;
|
||||
public static final int account_default=0x7f0a0005;
|
||||
public static final int account_delete_policy=0x7f0a0012;
|
||||
public static final int account_delete_policy_label=0x7f0a0011;
|
||||
public static final int account_description=0x7f0a0015;
|
||||
public static final int account_delete_policy=0x7f0a0015;
|
||||
public static final int account_delete_policy_label=0x7f0a0014;
|
||||
public static final int account_description=0x7f0a0018;
|
||||
public static final int account_email=0x7f0a0002;
|
||||
public static final int account_name=0x7f0a0016;
|
||||
public static final int account_notify=0x7f0a0019;
|
||||
public static final int account_is_default=0x7f0a000e;
|
||||
public static final int account_name=0x7f0a000a;
|
||||
public static final int account_notify=0x7f0a001b;
|
||||
public static final int account_password=0x7f0a0003;
|
||||
public static final int account_port=0x7f0a000f;
|
||||
public static final int account_require_login=0x7f0a001a;
|
||||
public static final int account_require_login_settings=0x7f0a001b;
|
||||
public static final int account_security_type=0x7f0a0010;
|
||||
public static final int account_server=0x7f0a000e;
|
||||
public static final int account_server_label=0x7f0a000d;
|
||||
public static final int account_settings=0x7f0a004e;
|
||||
public static final int account_signature=0x7f0a000b;
|
||||
public static final int account_username=0x7f0a000c;
|
||||
public static final int accounts=0x7f0a004d;
|
||||
public static final int add_attachment=0x7f0a0053;
|
||||
public static final int add_cc_bcc=0x7f0a004f;
|
||||
public static final int add_new_account=0x7f0a001d;
|
||||
public static final int attachment=0x7f0a003d;
|
||||
public static final int attachment_delete=0x7f0a0033;
|
||||
public static final int attachment_icon=0x7f0a0039;
|
||||
public static final int attachment_info=0x7f0a003a;
|
||||
public static final int attachment_name=0x7f0a0034;
|
||||
public static final int attachments=0x7f0a002e;
|
||||
public static final int bcc=0x7f0a002d;
|
||||
public static final int account_port=0x7f0a0012;
|
||||
public static final int account_require_login=0x7f0a001c;
|
||||
public static final int account_require_login_settings=0x7f0a001d;
|
||||
public static final int account_security_type=0x7f0a0013;
|
||||
public static final int account_server=0x7f0a0011;
|
||||
public static final int account_server_label=0x7f0a0010;
|
||||
public static final int account_settings=0x7f0a0050;
|
||||
public static final int account_signature=0x7f0a000c;
|
||||
public static final int account_username=0x7f0a000f;
|
||||
public static final int accounts=0x7f0a004f;
|
||||
public static final int add_attachment=0x7f0a0055;
|
||||
public static final int add_cc_bcc=0x7f0a0051;
|
||||
public static final int add_new_account=0x7f0a001f;
|
||||
public static final int attachment=0x7f0a003f;
|
||||
public static final int attachment_delete=0x7f0a0035;
|
||||
public static final int attachment_icon=0x7f0a003b;
|
||||
public static final int attachment_info=0x7f0a003c;
|
||||
public static final int attachment_name=0x7f0a0036;
|
||||
public static final int attachments=0x7f0a0030;
|
||||
public static final int bcc=0x7f0a002f;
|
||||
public static final int cancel=0x7f0a0009;
|
||||
public static final int cc=0x7f0a002c;
|
||||
public static final int check_mail=0x7f0a0047;
|
||||
public static final int chip=0x7f0a0024;
|
||||
public static final int compose=0x7f0a0048;
|
||||
public static final int date=0x7f0a0026;
|
||||
public static final int debug_logging=0x7f0a0022;
|
||||
public static final int delete=0x7f0a0038;
|
||||
public static final int delete_account=0x7f0a0046;
|
||||
public static final int description=0x7f0a001e;
|
||||
public static final int discard=0x7f0a0052;
|
||||
public static final int done=0x7f0a0017;
|
||||
public static final int download=0x7f0a003b;
|
||||
public static final int dump_settings=0x7f0a0049;
|
||||
public static final int edit_account=0x7f0a0045;
|
||||
public static final int email=0x7f0a001f;
|
||||
public static final int empty=0x7f0a001c;
|
||||
public static final int folder_name=0x7f0a0029;
|
||||
public static final int folder_status=0x7f0a002a;
|
||||
public static final int forward=0x7f0a004a;
|
||||
public static final int from=0x7f0a0025;
|
||||
public static final int cc=0x7f0a002e;
|
||||
public static final int check_mail=0x7f0a0049;
|
||||
public static final int chip=0x7f0a0026;
|
||||
public static final int compose=0x7f0a004a;
|
||||
public static final int date=0x7f0a0028;
|
||||
public static final int debug_logging=0x7f0a0024;
|
||||
public static final int delete=0x7f0a003a;
|
||||
public static final int delete_account=0x7f0a0048;
|
||||
public static final int description=0x7f0a0020;
|
||||
public static final int discard=0x7f0a0054;
|
||||
public static final int done=0x7f0a0019;
|
||||
public static final int download=0x7f0a003d;
|
||||
public static final int dump_settings=0x7f0a004b;
|
||||
public static final int edit_account=0x7f0a0047;
|
||||
public static final int email=0x7f0a0021;
|
||||
public static final int empty=0x7f0a001e;
|
||||
public static final int feedy=0x7f0a000d;
|
||||
public static final int folder_name=0x7f0a002b;
|
||||
public static final int folder_status=0x7f0a002c;
|
||||
public static final int forward=0x7f0a004c;
|
||||
public static final int from=0x7f0a0027;
|
||||
public static final int imap=0x7f0a0001;
|
||||
public static final int imap_path_prefix=0x7f0a0014;
|
||||
public static final int imap_path_prefix_section=0x7f0a0013;
|
||||
public static final int main_text=0x7f0a0028;
|
||||
public static final int imap_path_prefix=0x7f0a0017;
|
||||
public static final int imap_path_prefix_section=0x7f0a0016;
|
||||
public static final int main_text=0x7f0a002a;
|
||||
public static final int manual_setup=0x7f0a0006;
|
||||
public static final int mark_as_read=0x7f0a004b;
|
||||
public static final int mark_as_unread=0x7f0a0054;
|
||||
public static final int mark_as_read=0x7f0a004d;
|
||||
public static final int mark_as_unread=0x7f0a0056;
|
||||
public static final int message=0x7f0a0007;
|
||||
public static final int message_content=0x7f0a002f;
|
||||
public static final int new_message_count=0x7f0a0020;
|
||||
public static final int message_content=0x7f0a0031;
|
||||
public static final int new_message_count=0x7f0a0022;
|
||||
public static final int next=0x7f0a0004;
|
||||
public static final int open=0x7f0a0044;
|
||||
public static final int open=0x7f0a0046;
|
||||
public static final int pop=0x7f0a0000;
|
||||
public static final int previous=0x7f0a0035;
|
||||
public static final int previous=0x7f0a0037;
|
||||
public static final int progress=0x7f0a0008;
|
||||
public static final int quoted_text=0x7f0a0032;
|
||||
public static final int quoted_text_bar=0x7f0a0030;
|
||||
public static final int quoted_text_delete=0x7f0a0031;
|
||||
public static final int refresh=0x7f0a004c;
|
||||
public static final int reply=0x7f0a0036;
|
||||
public static final int reply_all=0x7f0a0037;
|
||||
public static final int save=0x7f0a0051;
|
||||
public static final int send=0x7f0a0050;
|
||||
public static final int sensitive_logging=0x7f0a0023;
|
||||
public static final int show_pictures=0x7f0a0041;
|
||||
public static final int show_pictures_section=0x7f0a0040;
|
||||
public static final int subject=0x7f0a0027;
|
||||
public static final int text1=0x7f0a0042;
|
||||
public static final int text2=0x7f0a0043;
|
||||
public static final int to=0x7f0a002b;
|
||||
public static final int to_container=0x7f0a003e;
|
||||
public static final int to_label=0x7f0a003f;
|
||||
public static final int version=0x7f0a0021;
|
||||
public static final int view=0x7f0a003c;
|
||||
public static final int quoted_text=0x7f0a0034;
|
||||
public static final int quoted_text_bar=0x7f0a0032;
|
||||
public static final int quoted_text_delete=0x7f0a0033;
|
||||
public static final int refresh=0x7f0a004e;
|
||||
public static final int reply=0x7f0a0038;
|
||||
public static final int reply_all=0x7f0a0039;
|
||||
public static final int save=0x7f0a0053;
|
||||
public static final int send=0x7f0a0052;
|
||||
public static final int sensitive_logging=0x7f0a0025;
|
||||
public static final int show_pictures=0x7f0a0043;
|
||||
public static final int show_pictures_section=0x7f0a0042;
|
||||
public static final int subject=0x7f0a0029;
|
||||
public static final int text1=0x7f0a0044;
|
||||
public static final int text2=0x7f0a0045;
|
||||
public static final int to=0x7f0a002d;
|
||||
public static final int to_container=0x7f0a0040;
|
||||
public static final int to_label=0x7f0a0041;
|
||||
public static final int version=0x7f0a0023;
|
||||
public static final int view=0x7f0a003e;
|
||||
}
|
||||
public static final class layout {
|
||||
public static final int account_setup_account_type=0x7f030000;
|
||||
public static final int account_setup_basics=0x7f030001;
|
||||
public static final int account_setup_check_settings=0x7f030002;
|
||||
public static final int account_setup_composition=0x7f030003;
|
||||
public static final int account_setup_incoming=0x7f030004;
|
||||
public static final int account_setup_names=0x7f030005;
|
||||
public static final int account_setup_options=0x7f030006;
|
||||
public static final int account_setup_outgoing=0x7f030007;
|
||||
public static final int accounts=0x7f030008;
|
||||
public static final int accounts_item=0x7f030009;
|
||||
public static final int debug=0x7f03000a;
|
||||
public static final int folder_message_list_child=0x7f03000b;
|
||||
public static final int folder_message_list_child_footer=0x7f03000c;
|
||||
public static final int folder_message_list_group=0x7f03000d;
|
||||
public static final int message_compose=0x7f03000e;
|
||||
public static final int message_compose_attachment=0x7f03000f;
|
||||
public static final int message_view=0x7f030010;
|
||||
public static final int message_view_attachment=0x7f030011;
|
||||
public static final int message_view_header=0x7f030012;
|
||||
public static final int recipient_dropdown_item=0x7f030013;
|
||||
public static final int account_setup_compositiontest=0x7f030004;
|
||||
public static final int account_setup_incoming=0x7f030005;
|
||||
public static final int account_setup_names=0x7f030006;
|
||||
public static final int account_setup_options=0x7f030007;
|
||||
public static final int account_setup_outgoing=0x7f030008;
|
||||
public static final int accounts=0x7f030009;
|
||||
public static final int accounts_item=0x7f03000a;
|
||||
public static final int debug=0x7f03000b;
|
||||
public static final int folder_message_list_child=0x7f03000c;
|
||||
public static final int folder_message_list_child_footer=0x7f03000d;
|
||||
public static final int folder_message_list_group=0x7f03000e;
|
||||
public static final int message_compose=0x7f03000f;
|
||||
public static final int message_compose_attachment=0x7f030010;
|
||||
public static final int message_view=0x7f030011;
|
||||
public static final int message_view_attachment=0x7f030012;
|
||||
public static final int message_view_header=0x7f030013;
|
||||
public static final int recipient_dropdown_item=0x7f030014;
|
||||
}
|
||||
public static final class menu {
|
||||
public static final int accounts_context=0x7f090000;
|
||||
@ -209,35 +212,36 @@ public final class R {
|
||||
public static final int message_view_option=0x7f090006;
|
||||
}
|
||||
public static final class string {
|
||||
public static final int account_delete_dlg_instructions_fmt=0x7f0600c7;
|
||||
public static final int account_delete_dlg_title=0x7f0600c6;
|
||||
public static final int account_delete_dlg_instructions_fmt=0x7f0600c8;
|
||||
public static final int account_delete_dlg_title=0x7f0600c7;
|
||||
public static final int account_settings_action=0x7f06001b;
|
||||
public static final int account_settings_add_account_label=0x7f0600b8;
|
||||
public static final int account_settings_always_bcc_label=0x7f0600c2;
|
||||
public static final int account_settings_always_bcc_summary=0x7f0600c3;
|
||||
public static final int account_settings_composition_label=0x7f0600c1;
|
||||
public static final int account_settings_composition_title=0x7f0600c0;
|
||||
public static final int account_settings_default_label=0x7f0600ad;
|
||||
public static final int account_settings_default_summary=0x7f0600ae;
|
||||
public static final int account_settings_description_label=0x7f0600b9;
|
||||
public static final int account_settings_email_label=0x7f0600b0;
|
||||
public static final int account_settings_incoming_label=0x7f0600b4;
|
||||
public static final int account_settings_incoming_summary=0x7f0600b5;
|
||||
public static final int account_settings_mail_check_frequency_label=0x7f0600b3;
|
||||
public static final int account_settings_name_label=0x7f0600ba;
|
||||
public static final int account_settings_notifications=0x7f0600bb;
|
||||
public static final int account_settings_notify_label=0x7f0600af;
|
||||
public static final int account_settings_notify_summary=0x7f0600b1;
|
||||
public static final int account_settings_outgoing_label=0x7f0600b6;
|
||||
public static final int account_settings_outgoing_summary=0x7f0600b7;
|
||||
public static final int account_settings_ringtone=0x7f0600be;
|
||||
public static final int account_settings_servers=0x7f0600bf;
|
||||
public static final int account_settings_show_combined_label=0x7f0600b2;
|
||||
public static final int account_settings_signature_label=0x7f0600c4;
|
||||
public static final int account_settings_signature_summary=0x7f0600c5;
|
||||
public static final int account_settings_add_account_label=0x7f0600b9;
|
||||
public static final int account_settings_always_bcc_label=0x7f0600c3;
|
||||
public static final int account_settings_always_bcc_summary=0x7f0600c4;
|
||||
public static final int account_settings_composition_label=0x7f0600c2;
|
||||
public static final int account_settings_composition_title=0x7f0600c1;
|
||||
public static final int account_settings_default=0x7f0600ad;
|
||||
public static final int account_settings_default_label=0x7f0600ae;
|
||||
public static final int account_settings_default_summary=0x7f0600af;
|
||||
public static final int account_settings_description_label=0x7f0600ba;
|
||||
public static final int account_settings_email_label=0x7f0600b1;
|
||||
public static final int account_settings_incoming_label=0x7f0600b5;
|
||||
public static final int account_settings_incoming_summary=0x7f0600b6;
|
||||
public static final int account_settings_mail_check_frequency_label=0x7f0600b4;
|
||||
public static final int account_settings_name_label=0x7f0600bb;
|
||||
public static final int account_settings_notifications=0x7f0600bc;
|
||||
public static final int account_settings_notify_label=0x7f0600b0;
|
||||
public static final int account_settings_notify_summary=0x7f0600b2;
|
||||
public static final int account_settings_outgoing_label=0x7f0600b7;
|
||||
public static final int account_settings_outgoing_summary=0x7f0600b8;
|
||||
public static final int account_settings_ringtone=0x7f0600bf;
|
||||
public static final int account_settings_servers=0x7f0600c0;
|
||||
public static final int account_settings_show_combined_label=0x7f0600b3;
|
||||
public static final int account_settings_signature_label=0x7f0600c5;
|
||||
public static final int account_settings_signature_summary=0x7f0600c6;
|
||||
public static final int account_settings_title_fmt=0x7f0600ac;
|
||||
public static final int account_settings_vibrate_enable=0x7f0600bc;
|
||||
public static final int account_settings_vibrate_summary=0x7f0600bd;
|
||||
public static final int account_settings_vibrate_enable=0x7f0600bd;
|
||||
public static final int account_settings_vibrate_summary=0x7f0600be;
|
||||
public static final int account_setup_account_type_imap_action=0x7f060079;
|
||||
public static final int account_setup_account_type_instructions=0x7f060077;
|
||||
public static final int account_setup_account_type_pop_action=0x7f060078;
|
||||
@ -407,8 +411,8 @@ public final class R {
|
||||
public static final int okay_action=0x7f060008;
|
||||
public static final int open_action=0x7f06001a;
|
||||
public static final int preferences_action=0x7f060019;
|
||||
public static final int provider_note_live=0x7f0600c9;
|
||||
public static final int provider_note_yahoo=0x7f0600c8;
|
||||
public static final int provider_note_live=0x7f0600ca;
|
||||
public static final int provider_note_yahoo=0x7f0600c9;
|
||||
public static final int read_action=0x7f06001e;
|
||||
public static final int read_attachment_desc=0x7f060002;
|
||||
public static final int read_attachment_label=0x7f060001;
|
||||
|
@ -23,7 +23,6 @@ public class AccountSettings extends PreferenceActivity {
|
||||
|
||||
private static final String PREFERENCE_TOP_CATERGORY = "account_settings";
|
||||
private static final String PREFERENCE_DESCRIPTION = "account_description";
|
||||
private static final String PREFERENCE_NAME = "account_name";
|
||||
private static final String PREFERENCE_COMPOSITION = "composition";
|
||||
private static final String PREFERENCE_FREQUENCY = "account_check_frequency";
|
||||
private static final String PREFERENCE_DEFAULT = "account_default";
|
||||
@ -36,7 +35,6 @@ public class AccountSettings extends PreferenceActivity {
|
||||
private Account mAccount;
|
||||
|
||||
private EditTextPreference mAccountDescription;
|
||||
private EditTextPreference mAccountName;
|
||||
private ListPreference mCheckFrequency;
|
||||
private CheckBoxPreference mAccountDefault;
|
||||
private CheckBoxPreference mAccountNotify;
|
||||
@ -72,18 +70,6 @@ public class AccountSettings extends PreferenceActivity {
|
||||
}
|
||||
});
|
||||
|
||||
mAccountName = (EditTextPreference) findPreference(PREFERENCE_NAME);
|
||||
mAccountName.setSummary(mAccount.getName());
|
||||
mAccountName.setText(mAccount.getName());
|
||||
mAccountName.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
final String summary = newValue.toString();
|
||||
mAccountName.setSummary(summary);
|
||||
mAccountName.setText(summary);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
mCheckFrequency = (ListPreference) findPreference(PREFERENCE_FREQUENCY);
|
||||
mCheckFrequency.setValue(String.valueOf(mAccount.getAutomaticCheckIntervalMinutes()));
|
||||
@ -152,7 +138,6 @@ public class AccountSettings extends PreferenceActivity {
|
||||
Preferences.getPreferences(this).setDefaultAccount(mAccount);
|
||||
}
|
||||
mAccount.setDescription(mAccountDescription.getText());
|
||||
mAccount.setName(mAccountName.getText());
|
||||
mAccount.setNotifyNewMail(mAccountNotify.isChecked());
|
||||
mAccount.setAutomaticCheckIntervalMinutes(Integer.parseInt(mCheckFrequency.getValue()));
|
||||
mAccount.setVibrate(mAccountVibrate.isChecked());
|
||||
|
@ -3,18 +3,15 @@ package com.fsck.k9.activity.setup;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.method.DigitsKeyListener;
|
||||
import android.view.View;
|
||||
import android.view.KeyEvent;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.EditTextPreference;
|
||||
|
||||
import com.fsck.k9.Account;
|
||||
import com.fsck.k9.Preferences;
|
||||
@ -25,42 +22,29 @@ import com.fsck.k9.Utility;
|
||||
public class AccountSetupComposition extends Activity {
|
||||
|
||||
private static final String EXTRA_ACCOUNT = "account";
|
||||
// rivate static final String EXTRA_MAKE_DEFAULT = "makeDefault";
|
||||
|
||||
private static final String PREFERENCE_ALWAYS_BCC = "account_always_bcc";
|
||||
private static final String PREFERENCE_EMAIL = "account_email";
|
||||
private static final String PREFERENCE_SIGNATURE = "account_signature";
|
||||
|
||||
private Account mAccount;
|
||||
|
||||
private EditText mAccountSignature;
|
||||
private EditText mAccountEmail;
|
||||
private EditText mAccountAlwaysBcc;
|
||||
private EditText mAccountName;
|
||||
|
||||
|
||||
|
||||
|
||||
public static void actionCompositionSettings(Activity context, Account account, boolean makeDefault) {
|
||||
Intent i = new Intent(context, AccountSetupComposition.class);
|
||||
i.putExtra(EXTRA_ACCOUNT, account);
|
||||
//i.putExtra(EXTRA_MAKE_DEFAULT, makeDefault);
|
||||
context.startActivity(i);
|
||||
}
|
||||
|
||||
|
||||
public static void actionEditCompositionSettings(Activity context, Account account) {
|
||||
Intent i = new Intent(context, AccountSetupComposition.class);
|
||||
i.setAction(Intent.ACTION_EDIT);
|
||||
i.putExtra(EXTRA_ACCOUNT, account);
|
||||
context.startActivity(i);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mAccount = (Account)getIntent().getSerializableExtra(EXTRA_ACCOUNT);
|
||||
// addPreferencesFromResource(R.xml.account_settings_preferences);
|
||||
|
||||
|
||||
setContentView(R.layout.account_setup_composition);
|
||||
|
||||
@ -72,6 +56,9 @@ public class AccountSetupComposition extends Activity {
|
||||
mAccount = (Account)savedInstanceState.getSerializable(EXTRA_ACCOUNT);
|
||||
}
|
||||
|
||||
mAccountName = (EditText)findViewById(R.id.account_name);
|
||||
mAccountName.setText(mAccount.getName());
|
||||
|
||||
mAccountEmail = (EditText)findViewById(R.id.account_email);
|
||||
mAccountEmail.setText(mAccount.getEmail());
|
||||
|
||||
@ -92,9 +79,11 @@ public class AccountSetupComposition extends Activity {
|
||||
private void saveSettings() {
|
||||
mAccount.setEmail(mAccountEmail.getText().toString());
|
||||
mAccount.setAlwaysBcc(mAccountAlwaysBcc.getText().toString());
|
||||
mAccount.setSignature(mAccountSignature.getText().toString());
|
||||
mAccount.setName(mAccountName.getText().toString());
|
||||
mAccount.setSignature(mAccountSignature.getText().toString());
|
||||
|
||||
mAccount.save(Preferences.getPreferences(this));
|
||||
k9.setServicesEnabled(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user