res/layout/preferences.xml
changeset 885 193a934390ba
parent 860 d1b0d878eac9
child 945 89f1be755b8d
equal deleted inserted replaced
884:b5104ccb1916 885:193a934390ba
     1 <?xml version="1.0" encoding="utf-8"?>
     1 <?xml version="1.0" encoding="utf-8"?>
     2 <!-- 
     2 	<!--
     3     The format of the preference key is defined in
     3 		The format of the preference key is defined in
     4     src/com/beem/project/beem/BeemApplication.java
     4 		src/com/beem/project/beem/BeemApplication.java Basically it is just a
     5     Basically it is just a simple name like account_username.
     5 		simple name like account_username. TODO: There is still a lot of keys
     6     TODO: There is still a lot of keys to convert
     6 		to convert
     7 -->
     7 	-->
     8 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
     8 <PreferenceScreen
     9 	android:shouldDisableView="true" android:selectable="true">
     9 	xmlns:android="http://schemas.android.com/apk/res/android"
    10 	<PreferenceCategory android:title="@string/general_preferences">
    10 	android:shouldDisableView="true"
    11 		<PreferenceScreen android:key="contact_list"
    11 	android:selectable="true">	
    12 			android:title="@string/contact_list_preferences" android:summary="@string/contact_list_preferences_sum">
    12 	<PreferenceCategory
    13 			<CheckBoxPreference android:title="@string/CLP_hidden_contact"
    13 		android:title="@string/general_preferences">
    14 				android:defaultValue="false" android:summary="@string/CLP_hidden_contact_sum"
    14 		<PreferenceScreen
       
    15 			android:key="contact_list"
       
    16 			android:title="@string/contact_list_preferences"
       
    17 			android:summary="@string/contact_list_preferences_sum">
       
    18 			<CheckBoxPreference
       
    19 				android:title="@string/CLP_hidden_contact"
       
    20 				android:defaultValue="false"
       
    21 				android:summary="@string/CLP_hidden_contact_sum"
    15 				android:key="settings_key_hidden_contact" />
    22 				android:key="settings_key_hidden_contact" />
    16 			<CheckBoxPreference android:title="@string/CLP_hide_groups"
    23 			<CheckBoxPreference
    17 				android:defaultValue="false" android:summary="@string/CLP_hide_groups_sum"
    24 				android:title="@string/CLP_hide_groups"
       
    25 				android:defaultValue="false"
       
    26 				android:summary="@string/CLP_hide_groups_sum"
    18 				android:key="settings_key_hide_groups" />
    27 				android:key="settings_key_hide_groups" />
    19 			<CheckBoxPreference android:title="@string/away_chk_title"
    28 			<CheckBoxPreference
    20 				android:defaultValue="true" android:summary="@string/away_chk_sum"
    29 				android:title="@string/away_chk_title"
       
    30 				android:defaultValue="true"
       
    31 				android:summary="@string/away_chk_sum"
    21 				android:key="settings_away_chk" />
    32 				android:key="settings_away_chk" />
    22 			<EditTextPreference android:dependency="settings_away_chk"
    33 			<EditTextPreference
    23 				android:singleLine="true" android:summary="@string/away_message_sum"
    34 				android:dependency="settings_away_chk"
    24 				android:title="@string/away_message_title" android:key="settings_away_message"
    35 				android:singleLine="true"
       
    36 				android:summary="@string/away_message_sum"
       
    37 				android:title="@string/away_message_title"
       
    38 				android:key="settings_away_message"
    25 				android:hint="@string/away_message_hint" />
    39 				android:hint="@string/away_message_hint" />
    26 		</PreferenceScreen>
    40 		</PreferenceScreen>
    27 		<PreferenceScreen android:key="chat"
    41 		<PreferenceScreen
    28 			android:title="@string/chat_preferences" android:summary="@string/chat_preferences_sum">
    42 			android:key="chat"
    29 			<PreferenceCategory android:title="@string/history_preferences">
    43 			android:title="@string/chat_preferences"
    30 				<CheckBoxPreference android:id="@+id/chat_history"
    44 			android:summary="@string/chat_preferences_sum">
    31 					android:title="@string/history" android:summary="@string/history_sum"
    45 			<PreferenceCategory
    32 					 android:defaultValue="false" android:key="settings_key_history" />
    46 				android:title="@string/history_preferences">
    33 				<EditTextPreference android:dependency="settings_key_history"
    47 				<CheckBoxPreference
    34 					android:singleLine="true" android:title="@string/chat_history_path"
    48 					android:id="@+id/chat_history"
    35 					android:summary="@string/chat_history_path_sum" android:key="settings_chat_history_path"
    49 					android:title="@string/history"
       
    50 					android:summary="@string/history_sum"
       
    51 					android:defaultValue="false"
       
    52 					android:key="settings_key_history" />
       
    53 				<EditTextPreference
       
    54 					android:dependency="settings_key_history"
       
    55 					android:singleLine="true"
       
    56 					android:title="@string/chat_history_path"
       
    57 					android:summary="@string/chat_history_path_sum"
       
    58 					android:key="settings_chat_history_path"
    36 					android:hint="/Android/data/com.beem.project.beem/chat/" />
    59 					android:hint="/Android/data/com.beem.project.beem/chat/" />
    37 			</PreferenceCategory>
    60 			</PreferenceCategory>
    38 			<PreferenceCategory android:title="@string/chat_layout_option">
    61 			<PreferenceCategory
    39 				<CheckBoxPreference android:title="@string/settings_chat_compact"
    62 				android:title="@string/chat_layout_option">
    40 					android:defaultValue="false" android:summary="@string/settings_chat_compact_sum"
    63 				<CheckBoxPreference
       
    64 					android:title="@string/settings_chat_compact"
       
    65 					android:defaultValue="false"
       
    66 					android:summary="@string/settings_chat_compact_sum"
    41 					android:key="settings_chat_compact_key" />
    67 					android:key="settings_chat_compact_key" />
    42 			</PreferenceCategory>
    68 			</PreferenceCategory>
    43 			</PreferenceScreen>
    69 		</PreferenceScreen>
    44 		<PreferenceScreen android:title="@string/notification_preferences">
    70 		<PreferenceScreen
    45 			<CheckBoxPreference android:title="@string/notification_enable_vibrate_title"
    71 			android:title="@string/notification_preferences">
    46 				android:defaultValue="false" android:summary="@string/notification_enable_vibrate_sum"
    72 			<CheckBoxPreference
       
    73 				android:title="@string/notification_enable_vibrate_title"
       
    74 				android:defaultValue="false"
       
    75 				android:summary="@string/notification_enable_vibrate_sum"
    47 				android:key="notification_vibrate" />
    76 				android:key="notification_vibrate" />
    48 			<RingtonePreference android:title="@string/notification_snd_title"
    77 			<RingtonePreference
    49 				android:key="notification_sound" android:summary="@string/notification_snd_sum"
    78 				android:title="@string/notification_snd_title"
    50 				android:ringtoneType="notification" android:showDefault="true" />
    79 				android:key="notification_sound"
    51 		</PreferenceScreen>
    80 				android:summary="@string/notification_snd_sum"
    52 	</PreferenceCategory>
    81 				android:ringtoneType="notification"
    53 	<PreferenceCategory android:title="@string/user_preferences">
    82 				android:showDefault="true" />
    54 		<EditTextPreference android:singleLine="true"
    83 		</PreferenceScreen>
    55 			android:summary="@string/SettingsText" android:title="@string/settings_account_username"
    84 	</PreferenceCategory>
    56 			android:key="account_username" android:hint="@string/login_username_info_default"
    85 	<PreferenceCategory
       
    86 		android:title="@string/user_preferences">
       
    87 		<EditTextPreference
       
    88 			android:singleLine="true"
       
    89 			android:summary="@string/SettingsText"
       
    90 			android:title="@string/settings_account_username"
       
    91 			android:key="account_username"
       
    92 			android:hint="@string/login_username_info_default"
    57 			android:inputType="textEmailAddress" />
    93 			android:inputType="textEmailAddress" />
    58 		<EditTextPreference android:name="password"
    94 		<EditTextPreference
    59 			android:singleLine="true" android:password="true" android:summary="@string/SettingsPassword"
    95 			android:name="password"
    60 			android:title="@string/settings_account_password" android:key="account_password" />
    96 			android:singleLine="true"
    61 	</PreferenceCategory>
    97 			android:password="true"
    62 	<PreferenceCategory android:title="@string/user_preferences_advanced">
    98 			android:summary="@string/SettingsPassword"
    63 		<EditTextPreference android:key="settings_key_resource"
    99 			android:title="@string/settings_account_password"
    64 			android:title="@string/SettingsResourceTitle" android:summary="@string/SettingsResourceSummary"
   100 			android:key="account_password" />
       
   101 	</PreferenceCategory>
       
   102 	<PreferenceCategory
       
   103 		android:title="@string/user_preferences_advanced">
       
   104 		<EditTextPreference
       
   105 			android:key="settings_key_resource"
       
   106 			android:title="@string/SettingsResourceTitle"
       
   107 			android:summary="@string/SettingsResourceSummary"
    65 			android:defaultValue="Beem" />
   108 			android:defaultValue="Beem" />
    66 		<EditTextPreference android:key="settings_key_priority"
   109 		<EditTextPreference
    67 			android:title="@string/SettingsPriorityTitle" android:summary="@string/SettingsPrioritySummary"
   110 			android:key="settings_key_priority"
    68 			android:numeric="signed" android:defaultValue="0" />
   111 			android:title="@string/SettingsPriorityTitle"
    69 	</PreferenceCategory>
   112 			android:summary="@string/SettingsPrioritySummary"
    70 	<PreferenceCategory android:title="@string/network_preferences">
   113 			android:numeric="signed"
    71 		<PreferenceScreen android:key="proxy" android:title="@string/SettingsProxy"
   114 			android:defaultValue="0" />
       
   115 	</PreferenceCategory>
       
   116 	<PreferenceCategory
       
   117 		android:title="@string/network_preferences">
       
   118 		<PreferenceScreen
       
   119 			android:key="proxy"
       
   120 			android:title="@string/SettingsProxy"
    72 			android:summary="@string/settings_proxy_sum">
   121 			android:summary="@string/settings_proxy_sum">
    73 			<CheckBoxPreference android:title="@string/SettingsProxyProxy"
   122 			<CheckBoxPreference
    74 				android:defaultValue="false" android:summary="@string/SettingsProxySummary"
   123 				android:title="@string/SettingsProxyProxy"
       
   124 				android:defaultValue="false"
       
   125 				android:summary="@string/SettingsProxySummary"
    75 				android:key="proxy_use" />
   126 				android:key="proxy_use" />
    76 			<PreferenceCategory android:title="@string/proxy_proxy_settings">
   127 			<PreferenceCategory
    77 				<ListPreference android:dependency="proxy_use"
   128 				android:title="@string/proxy_proxy_settings">
    78 					android:title="@string/SettingsProxyType" android:entries="@array/proxy_types"
   129 				<ListPreference
       
   130 					android:dependency="proxy_use"
       
   131 					android:title="@string/SettingsProxyType"
       
   132 					android:entries="@array/proxy_types"
    79 					android:summary="@string/SettingsProxyTypeSummary"
   133 					android:summary="@string/SettingsProxyTypeSummary"
    80 					android:defaultValue="HTTP" android:entryValues="@array/proxy_types"
   134 					android:defaultValue="HTTP"
       
   135 					android:entryValues="@array/proxy_types"
    81 					android:key="proxy_type" />
   136 					android:key="proxy_type" />
    82 				<EditTextPreference android:singleLine="true"
   137 				<EditTextPreference
    83 					android:dependency="proxy_use" android:name="serveur"
   138 					android:singleLine="true"
    84 					android:summary="@string/SettingsProxyServer" android:title="@string/settings_proxy_server"
   139 					android:dependency="proxy_use"
       
   140 					android:name="serveur"
       
   141 					android:summary="@string/SettingsProxyServer"
       
   142 					android:title="@string/settings_proxy_server"
    85 					android:key="proxy_server" />
   143 					android:key="proxy_server" />
    86 				<EditTextPreference android:singleLine="true"
   144 				<EditTextPreference
    87 					android:dependency="proxy_use" android:name="port"
   145 					android:singleLine="true"
    88 					android:summary="@string/SettingsProxyPort" android:title="@string/settings_proxy_port"
   146 					android:dependency="proxy_use"
    89 					android:key="proxy_port" android:numeric="signed"
   147 					android:name="port"
       
   148 					android:summary="@string/SettingsProxyPort"
       
   149 					android:title="@string/settings_proxy_port"
       
   150 					android:key="proxy_port"
       
   151 					android:numeric="signed"
    90 					android:hint="@string/comments_proxy_port" />
   152 					android:hint="@string/comments_proxy_port" />
    91 			</PreferenceCategory>
   153 			</PreferenceCategory>
    92 			<PreferenceCategory android:title="@string/proxy_user_settings">
   154 			<PreferenceCategory
    93 				<EditTextPreference android:singleLine="true"
   155 				android:title="@string/proxy_user_settings">
    94 					android:dependency="proxy_use" android:name="Utilisateur"
   156 				<EditTextPreference
    95 					android:summary="@string/SettingsProxyUser" android:title="@string/settings_proxy_username"
   157 					android:singleLine="true"
       
   158 					android:dependency="proxy_use"
       
   159 					android:name="Utilisateur"
       
   160 					android:summary="@string/SettingsProxyUser"
       
   161 					android:title="@string/settings_proxy_username"
    96 					android:key="proxy_username" />
   162 					android:key="proxy_username" />
    97 				<EditTextPreference android:singleLine="true"
   163 				<EditTextPreference
    98 					android:dependency="proxy_use" android:name="pass_user"
   164 					android:singleLine="true"
    99 					android:password="true" android:summary="@string/SettingsProxyPassword"
   165 					android:dependency="proxy_use"
   100 					android:title="@string/settings_proxy_password" android:key="proxy_password" />
   166 					android:name="pass_user"
   101 			</PreferenceCategory>
   167 					android:password="true"
   102 		</PreferenceScreen>
   168 					android:summary="@string/SettingsProxyPassword"
   103 
   169 					android:title="@string/settings_proxy_password"
   104 		<PreferenceScreen android:key="advanced"
   170 					android:key="proxy_password" />
   105 			android:title="@string/SettingsAdvanced" android:summary="@string/settings_advanced_sum">
   171 			</PreferenceCategory>
   106 			<PreferenceCategory android:title="@string/settings_advanced_service_behaviour">
   172 		</PreferenceScreen>
   107 				<CheckBoxPreference android:title="@string/settings_xmpp_use_tls"
   173 		<PreferenceScreen
   108 					android:defaultValue="false" android:key="settings_key_xmpp_tls_use" />
   174 			android:key="advanced"
   109 				<CheckBoxPreference android:title="@string/settings_smack_debug"
   175 			android:title="@string/SettingsAdvanced"
   110 					android:defaultValue="false" android:key="smack_debug" />
   176 			android:summary="@string/settings_advanced_sum">
   111 				<EditTextPreference android:singleLine="true"
   177 			<PreferenceCategory
   112 					android:title="@string/settings_reco_delay" android:name="Reconnect delay"
   178 				android:title="@string/settings_advanced_service_behaviour">
   113 					android:summary="@string/SettingsAdvancedRecoDelay" android:key="settings_key_reco_delay"
   179 				<CheckBoxPreference
       
   180 					android:title="@string/settings_xmpp_use_tls"
       
   181 					android:defaultValue="false"
       
   182 					android:key="settings_key_xmpp_tls_use" />
       
   183 				<CheckBoxPreference
       
   184 					android:title="@string/settings_smack_debug"
       
   185 					android:defaultValue="false"
       
   186 					android:key="smack_debug" />
       
   187 				<EditTextPreference
       
   188 					android:singleLine="true"
       
   189 					android:title="@string/settings_reco_delay"
       
   190 					android:name="Reconnect delay"
       
   191 					android:summary="@string/SettingsAdvancedRecoDelay"
       
   192 					android:key="settings_key_reco_delay"
   114 					android:defaultValue="10" />
   193 					android:defaultValue="10" />
   115 			</PreferenceCategory>
   194 			</PreferenceCategory>
   116 			<CheckBoxPreference android:title="@string/SettingsAdvancedOptions"
   195 			<CheckBoxPreference
   117 				android:defaultValue="false" android:summary="@string/SettingsAdvancedSpecOpt"
   196 				android:title="@string/SettingsAdvancedOptions"
       
   197 				android:defaultValue="false"
       
   198 				android:summary="@string/SettingsAdvancedSpecOpt"
   118 				android:key="settings_key_specific_server" />
   199 				android:key="settings_key_specific_server" />
   119 			<EditTextPreference android:singleLine="true"
   200 			<EditTextPreference
   120 				android:dependency="settings_key_specific_server" android:name="adresse"
   201 				android:singleLine="true"
   121 				android:summary="@string/SettingsAdvancedAddOpt" android:title="@string/settings_xmpp_server"
   202 				android:dependency="settings_key_specific_server"
   122 				android:key="settings_key_xmpp_server" android:hint="@string/comments_xmpp_server" />
   203 				android:name="adresse"
   123 			<EditTextPreference android:singleLine="true"
   204 				android:summary="@string/SettingsAdvancedAddOpt"
   124 				android:dependency="settings_key_specific_server" android:name="port"
   205 				android:title="@string/settings_xmpp_server"
   125 				android:summary="@string/SettingsAdvancedPortOpt" android:title="@string/settings_xmpp_port"
   206 				android:key="settings_key_xmpp_server"
   126 				android:defaultValue="5222" android:numeric="signed" android:key="settings_key_xmpp_port"
   207 				android:hint="@string/comments_xmpp_server" />
       
   208 			<EditTextPreference
       
   209 				android:singleLine="true"
       
   210 				android:dependency="settings_key_specific_server"
       
   211 				android:name="port"
       
   212 				android:summary="@string/SettingsAdvancedPortOpt"
       
   213 				android:title="@string/settings_xmpp_port"
       
   214 				android:defaultValue="5222"
       
   215 				android:numeric="signed"
       
   216 				android:key="settings_key_xmpp_port"
   127 				android:hint="@string/comments_xmpp_port" />
   217 				android:hint="@string/comments_xmpp_port" />
   128 			<CheckBoxPreference android:title="@string/settings_full_jid_login"
   218 			<CheckBoxPreference
   129 				android:defaultValue="false" android:summary="@string/settings_full_jid_login_sum"
   219 				android:title="@string/settings_full_jid_login"
       
   220 				android:defaultValue="false"
       
   221 				android:summary="@string/settings_full_jid_login_sum"
   130 				android:key="full_jid_login" />
   222 				android:key="full_jid_login" />
   131 		</PreferenceScreen>
   223 		</PreferenceScreen>
   132 	</PreferenceCategory>
   224 	</PreferenceCategory>
   133 </PreferenceScreen>
   225 </PreferenceScreen>