Changed layout of dialogs for a11y
am: d3bf8fc52b

Change-Id: I4f673281faa8aa52ed5b9cbd1700501af4b0c3ef
diff --git a/res/layout/contact_editor_label_name_dialog.xml b/res/layout/contact_editor_label_name_dialog.xml
index 162f85d..61765ce 100644
--- a/res/layout/contact_editor_label_name_dialog.xml
+++ b/res/layout/contact_editor_label_name_dialog.xml
@@ -18,14 +18,19 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingLeft="25dip"
-    android:paddingRight="25dip"
-    android:paddingStart="25dip"
-    android:paddingEnd="25dip"
-    android:paddingTop="25dip"
-    android:paddingBottom="25dip">
+    android:paddingStart="@dimen/custom_dialog_layout_padding"
+    android:paddingEnd="@dimen/custom_dialog_layout_padding"
+    android:paddingTop="@dimen/custom_dialog_layout_padding">
+
     <EditText
         android:id="@+id/custom_dialog_content"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="@dimen/custom_dialog_layout"
+        android:layout_marginEnd="@dimen/custom_dialog_layout"
+        android:hint="@string/label_name_dialog_hint"
+        android:minWidth="@dimen/custom_dialog_min_width"
+        android:minHeight="@dimen/dialog_edit_text_min_height"
+        android:lines="1"
+        android:textAlignment="viewStart"/>
 </FrameLayout>
diff --git a/res/layout/dialog_title.xml b/res/layout/dialog_title.xml
index b88f47c..45f5f73 100644
--- a/res/layout/dialog_title.xml
+++ b/res/layout/dialog_title.xml
@@ -23,6 +23,7 @@
     android:paddingEnd="24dp"
     android:textSize="20sp"
     android:textColor="@color/contacts_text_color"
+    android:textAlignment="viewStart"
     android:fontFamily="sans-serif-medium"
     android:ellipsize="end"
 />
\ No newline at end of file
diff --git a/res/layout/group_name_edit_dialog.xml b/res/layout/group_name_edit_dialog.xml
index 5df8c9d..94db3dd 100644
--- a/res/layout/group_name_edit_dialog.xml
+++ b/res/layout/group_name_edit_dialog.xml
@@ -18,11 +18,12 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/text_input_layout"
-    android:layout_width="wrap_content"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
-    android:paddingEnd="24dp"
-    android:paddingStart="24dp"
+    android:paddingTop="@dimen/custom_dialog_layout_padding"
+    android:paddingEnd="@dimen/custom_dialog_layout_padding"
+    android:paddingStart="@dimen/custom_dialog_layout_padding"
     app:errorEnabled="true"
     app:hintEnabled="false">
 
@@ -30,12 +31,12 @@
         android:id="@android:id/text1"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginBottom="4dp"
-        android:layout_marginRight="4dp"
-        android:layout_marginTop="16dp"
+        android:layout_marginBottom="@dimen/custom_dialog_layout"
+        android:layout_marginEnd="@dimen/custom_dialog_layout"
         android:hint="@string/group_name_dialog_hint"
         android:inputType="text"
         android:maxLength="@integer/group_name_max_length"
-        android:minHeight="@dimen/group_name_edit_text_min_height"
+        android:minHeight="@dimen/dialog_edit_text_min_height"
+        android:textAlignment="viewStart"
         android:singleLine="true"/>
 </android.support.design.widget.TextInputLayout>
\ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d434ef2..2b7132e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -118,6 +118,15 @@
     <!-- Minimum width for the photo action popup options -->
     <dimen name="photo_action_popup_min_width">300dip</dimen>
 
+    <!-- Minimum width for the custom label edit dialog -->
+    <dimen name="custom_dialog_min_width">300dip</dimen>
+
+    <!-- Custom dialog padding dimens -->
+    <dimen name="custom_dialog_layout_padding">24dip</dimen>
+
+    <!-- Custom dialog layout dimens -->
+    <dimen name="custom_dialog_layout">4dip</dimen>
+
     <!-- Top and bottom padding for a contact detail item -->
     <dimen name="detail_item_vertical_margin">8dip</dimen>
 
@@ -269,7 +278,7 @@
     <dimen name="edit_group_end_margin">72dp</dimen>
 
     <!-- Minimum height for group name EditText -->
-    <dimen name="group_name_edit_text_min_height">48dp</dimen>
+    <dimen name="dialog_edit_text_min_height">48dp</dimen>
 
     <!-- Distance to pull down before causing a refresh. -->
     <dimen name="pull_to_refresh_distance">40dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1615cf7..0f75c9c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -486,7 +486,10 @@
     <string name="group_name_dialog_update_title">Rename label</string>
 
     <!-- Hint for the label name input field on the insert and update label dialogs [CHAR LIMIT=15] -->
-    <string name="group_name_dialog_hint">Label</string>
+    <string name="group_name_dialog_hint">Label name</string>
+
+    <!-- Hint for the custom label name input filed on dialogs [CHAR LIMIT=15] -->
+    <string name="label_name_dialog_hint">Label name</string>
 
     <!-- Generic action string for starting an audio chat. Used by AccessibilityService to announce the purpose of the view. [CHAR LIMIT=NONE] -->
     <string name="audio_chat">Voice chat</string>