Improved some EditTexts' inputMethod value

This commit is contained in:
Sylvain Berfini 2016-07-21 11:22:08 +02:00
parent ed8734f55d
commit f049bff00c
11 changed files with 56 additions and 42 deletions

View file

@ -55,7 +55,7 @@
android:id="@+id/username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"

View file

@ -49,7 +49,7 @@
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -110,7 +110,7 @@
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textPersonName"
android:contentDescription="@string/content_description_display_field"
android:layout_width="match_parent"
android:layout_height="40dp"

View file

@ -53,7 +53,7 @@
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -107,7 +107,7 @@
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textPersonName"
android:contentDescription="@string/content_description_display_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -132,7 +132,7 @@
android:id="@+id/assistant_domain"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textUri"
android:contentDescription="@string/content_description_domain_field"
android:layout_width="match_parent"
android:layout_height="40dp"

View file

@ -50,7 +50,7 @@
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:contentDescription="@string/content_description_username_field"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:layout_width="match_parent"
android:layout_height="40dp"
android:singleLine="true"/>
@ -153,7 +153,7 @@
android:id="@+id/email"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="textEmailAddress"
android:contentDescription="@string/content_description_email_field"
android:textCursorDrawable="@null"
android:layout_width="match_parent"

View file

@ -45,7 +45,7 @@
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -87,7 +87,7 @@
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textPersonName"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"

View file

@ -45,7 +45,7 @@
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="text|textEmailAddress"
android:inputType="text|textNoSuggestions"
android:contentDescription="@string/content_description_username_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -80,7 +80,7 @@
android:id="@+id/assistant_domain"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textUri"
android:contentDescription="@string/content_description_domain_field"
android:layout_width="match_parent"
android:layout_height="40dp"
@ -98,7 +98,7 @@
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:inputType="textEmailAddress"
android:inputType="textPersonName"
android:contentDescription="@string/content_description_display_field"
android:layout_width="match_parent"
android:layout_height="40dp"

View file

@ -42,7 +42,7 @@
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:inputType="textNoSuggestions"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"
@ -84,7 +84,7 @@
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:inputType="textUri"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingLeft="10dp"

View file

@ -3,97 +3,113 @@
<PreferenceCategory
android:title="@string/pref_sipaccount"
android:key="@string/pref_sipaccount_key">
android:key="@string/pref_sipaccount_key"
android:persistent="false">
<EditTextPreference
android:title="@string/pref_username"
android:inputType="text|textNoSuggestions"
android:dialogMessage="@string/pref_help_username"
android:persistent="true"/>
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_auth_userid"
android:inputType="text|textNoSuggestions"
android:dialogMessage="@string/pref_help_auth_userid"
android:persistent="true"/>
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_passwd"
android:dialogMessage="@string/pref_help_password"
android:persistent="true"/>
android:inputType="textPassword"
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_domain"
android:dialogMessage="@string/pref_help_domain"
android:persistent="true"/>
android:inputType="textUri"
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_display_name"
android:inputType="textPersonName"
android:dialogMessage="@string/pref_help_display_name"
android:persistent="true"/>
android:persistent="false"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_advanced_title"
android:key="@string/pref_advanced_key">
android:key="@string/pref_advanced_key"
android:persistent="false">
<ListPreference
android:title="@string/pref_transport"
android:key="@string/pref_transport_key"/>
android:key="@string/pref_transport_key"
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_proxy"
android:inputType="textUri"
android:summary="@string/pref_help_proxy"
android:persistent="true"/>
android:persistent="false"/>
<CheckBoxPreference
android:title="@string/pref_enable_outbound_proxy"
android:dialogMessage="@string/pref_help_outbound_proxy"
android:summary="@string/pref_help_outbound_proxy"
android:persistent="true"/>
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_expire_title"
android:key="@string/pref_expire_key"
android:numeric="integer" />
android:numeric="integer"
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_prefix"
android:key="@string/pref_prefix_key"/>
android:key="@string/pref_prefix_key"
android:persistent="false"/>
<CheckBoxPreference
android:title="@string/pref_avpf"
android:key="@string/pref_avpf_key"/>
android:key="@string/pref_avpf_key"
android:persistent="false"/>
<EditTextPreference
android:title="@string/pref_avpf_rr_interval"
android:key="@string/pref_avpf_rr_interval_key"
android:numeric="integer"/>
android:numeric="integer"
android:persistent="false"/>
<CheckBoxPreference
android:title="@string/pref_escape_plus"
android:key="@string/pref_escape_plus_key"/>
android:key="@string/pref_escape_plus_key"
android:persistent="false"/>
<CheckBoxPreference
android:title="@string/pref_friendlist_subscribe"
android:key="@string/pref_friendlist_subscribe_key"/>
android:key="@string/pref_friendlist_subscribe_key"
android:persistent="false"/>
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_manage_title"
android:key="@string/pref_manage_key">
android:key="@string/pref_manage_key"
android:persistent="false">
<CheckBoxPreference
android:title="@string/pref_disable_account"
android:persistent="true"/>
android:persistent="false"/>
<CheckBoxPreference
android:title="@string/pref_default_account"
android:persistent="true"/>
android:persistent="false"/>
<Preference
android:title="@string/pref_delete_account"
android:persistent="true"/>
android:persistent="false"/>
</PreferenceCategory>

View file

@ -33,6 +33,7 @@
<EditTextPreference
android:title="@string/pref_tunnel_host"
android:key="@string/pref_tunnel_host_key"
android:inputType="textUri"
android:persistent="false"/>
<EditTextPreference
@ -229,6 +230,7 @@
android:title="@string/pref_image_sharing_server_title"
android:key="@string/pref_image_sharing_server_key"
android:summary="@string/pref_image_sharing_server_desc"
android:inputType="textUri"
android:persistent="false"/>
</PreferenceCategory>
@ -249,6 +251,7 @@
<EditTextPreference
android:title="@string/pref_stun_server"
android:key="@string/pref_stun_server_key"
android:inputType="textUri"
android:persistent="false"/>
<CheckBoxPreference
@ -340,6 +343,7 @@
<EditTextPreference
android:title="@string/pref_remote_provisioning_title"
android:key="@string/pref_remote_provisioning_key"
android:inputType="textUri"
android:persistent="false"/>
</PreferenceCategory>
@ -350,6 +354,7 @@
<EditTextPreference
android:title="@string/pref_display_name_title"
android:key="@string/pref_display_name_key"
android:inputType="textPersonName"
android:persistent="false"/>
<EditTextPreference

View file

@ -280,7 +280,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
PreferenceCategory account = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_sipaccount_key));
EditTextPreference username = (EditTextPreference) account.getPreference(0);
username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
username.setOnPreferenceChangeListener(usernameChangedListener);
if (!isNewAccount){
username.setText(mPrefs.getAccountUsername(n));
@ -288,7 +287,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
}
EditTextPreference userid = (EditTextPreference) account.getPreference(1);
userid.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
userid.setOnPreferenceChangeListener(useridChangedListener);
if (!isNewAccount){
userid.setText(mPrefs.getAccountUserId(n));
@ -296,14 +294,12 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
}
EditTextPreference password = (EditTextPreference) account.getPreference(2);
password.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
password.setOnPreferenceChangeListener(passwordChangedListener);
if(!isNewAccount){
password.setText(mPrefs.getAccountPassword(n));
}
EditTextPreference domain = (EditTextPreference) account.getPreference(3);
domain.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
domain.setOnPreferenceChangeListener(domainChangedListener);
if (!isNewAccount){
domain.setText(mPrefs.getAccountDomain(n));
@ -311,7 +307,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
}
EditTextPreference displayName = (EditTextPreference) account.getPreference(4);
displayName.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PERSON_NAME);
displayName.setOnPreferenceChangeListener(displayNameChangedListener);
if (!isNewAccount){
displayName.setText(mPrefs.getAccountDisplayName(n));
@ -327,7 +322,6 @@ public class AccountPreferencesFragment extends PreferencesListFragment {
}
mProxyPreference = (EditTextPreference) advanced.getPreference(1);
mProxyPreference.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
mProxyPreference.setOnPreferenceChangeListener(proxyChangedListener);
if (!isNewAccount){
mProxyPreference.setText(mPrefs.getAccountProxy(n));

View file

@ -61,7 +61,6 @@ import android.os.Parcelable;
import android.provider.MediaStore;
import android.support.v4.content.CursorLoader;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.view.ContextMenu;
import android.view.Gravity;