Add hints to some text fields for RTL
Having a hint makes sure the cursor is positioned in the right
end of the text field by default for both LTR and RTL locales.
This fixes the user dictionary "add to dictionary" interface
parts, and the "connect to hidden network" interface.
Bug: 8654823
Change-Id: I7c83d35734e53da94bb949e362c5260934ef0b76
diff --git a/res/layout/user_dictionary_add_word.xml b/res/layout/user_dictionary_add_word.xml
index d8b8694..3624dad 100644
--- a/res/layout/user_dictionary_add_word.xml
+++ b/res/layout/user_dictionary_add_word.xml
@@ -45,6 +45,7 @@
android:layout_marginStart="8dip"
android:layout_marginBottom="8dip"
android:layout_marginTop="8dip"
+ android:hint="@string/user_dict_settings_add_word_hint"
android:inputType="textNoSuggestions"
android:imeOptions="flagNoFullscreen">
<requestFocus />
diff --git a/res/layout/user_dictionary_add_word_fullscreen.xml b/res/layout/user_dictionary_add_word_fullscreen.xml
index f29c669..b72886f 100644
--- a/res/layout/user_dictionary_add_word_fullscreen.xml
+++ b/res/layout/user_dictionary_add_word_fullscreen.xml
@@ -33,6 +33,7 @@
android:layout_marginStart="8dip"
android:layout_marginBottom="8dip"
android:layout_marginTop="8dip"
+ android:hint="@string/user_dict_settings_add_word_hint"
android:inputType="textNoSuggestions"
android:imeOptions="flagNoFullscreen">
<requestFocus />
@@ -56,6 +57,7 @@
android:layout_marginStart="8dip"
android:layout_marginBottom="8dip"
android:layout_marginTop="8dip"
+ android:hint="@string/user_dict_settings_add_shortcut_hint"
android:inputType="textNoSuggestions"
android:imeOptions="flagNoFullscreen" />
<TextView android:id="@+id/user_dictionary_add_locale_label"
diff --git a/res/layout/wifi_ap_dialog.xml b/res/layout/wifi_ap_dialog.xml
index d458cd3..a2146c6 100644
--- a/res/layout/wifi_ap_dialog.xml
+++ b/res/layout/wifi_ap_dialog.xml
@@ -46,6 +46,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
+ android:hint="@string/wifi_ssid_hint"
android:inputType="textNoSuggestions"
android:maxLength="32" />
diff --git a/res/layout/wifi_config_ui_for_setup_wizard.xml b/res/layout/wifi_config_ui_for_setup_wizard.xml
index fef10b3..143d9ee 100644
--- a/res/layout/wifi_config_ui_for_setup_wizard.xml
+++ b/res/layout/wifi_config_ui_for_setup_wizard.xml
@@ -86,6 +86,7 @@
android:layout_width="368dip"
android:layout_height="wrap_content"
android:singleLine="true"
+ android:hint="@string/wifi_ssid_hint"
android:inputType="textNoSuggestions"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="20sp" />
diff --git a/res/layout/wifi_dialog.xml b/res/layout/wifi_dialog.xml
index 7a7d0b0..cd968b1 100644
--- a/res/layout/wifi_dialog.xml
+++ b/res/layout/wifi_dialog.xml
@@ -40,6 +40,7 @@
<EditText android:id="@+id/ssid"
style="@style/wifi_item_edit_content"
+ android:hint="@string/wifi_ssid_hint"
android:maxLength="32"
android:singleLine="true"
android:inputType="textNoSuggestions" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 32b30a0..93f936b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1385,6 +1385,8 @@
<string name="wifi_wps_failed_overlap">Another WPS session was detected. Please try again in a few minutes.</string>
<!-- Label for the SSID of the network -->
<string name="wifi_ssid">Network SSID</string>
+ <!-- Hint for a text field to enter the SSID of a hidden wifi network. [CHAR LIMIT=35] -->
+ <string name="wifi_ssid_hint">Enter the SSID</string>
<!-- Label for the security of the connection -->
<string name="wifi_security">Security</string>
<!-- Label for the signal strength of the connection -->
@@ -2949,6 +2951,10 @@
<string name="user_dict_settings_add_shortcut_option_name">Shortcut:</string>
<!-- User dictionary settings. Label to put before the language field. [CHAR LIMIT=20] -->
<string name="user_dict_settings_add_locale_option_name">Language:</string>
+ <!-- User dictionary settings. Hint for the text field to type the word to add to the user dictionary. [CHAR LIMIT=35] -->
+ <string name="user_dict_settings_add_word_hint">Type a word</string>
+ <!-- User dictionary settings. Hint for the text field to type the optional shortcut to add to the user dictionary. [CHAR LIMIT=35] -->
+ <string name="user_dict_settings_add_shortcut_hint">Optional shortcut</string>
<!-- User dictionary settings. The title of the dialog to edit an existing word in the user dictionary. -->
<string name="user_dict_settings_edit_dialog_title">Edit word</string>
<!-- User dictionary settings. The title of the context menu item to edit the current word -->