merge in jb-ub-latinimegoogle-azuki history after reset to jb-ub-latinimegoogle
diff --git a/java/res/layout/setup_step.xml b/java/res/layout/setup_step.xml
index c6462e9..fa84902 100644
--- a/java/res/layout/setup_step.xml
+++ b/java/res/layout/setup_step.xml
@@ -25,14 +25,14 @@
     <TextView
         android:id="@+id/setup_step_title"
         style="@style/setupStepTitleStyle"
-        android:paddingTop="16dp"
-        android:paddingBottom="16dp" />
+        android:paddingTop="@dimen/setup_step_vertical_padding"
+        android:paddingBottom="@dimen/setup_step_vertical_padding" />
     <TextView
         android:id="@+id/setup_step_instruction"
         style="@style/setupStepInstructionStyle"
-        android:paddingBottom="16dp" />
+        android:paddingBottom="@dimen/setup_step_vertical_padding" />
     <TextView
         android:id="@+id/setup_step_action_label"
         style="@style/setupStepActionLabelStyle"
-        android:layout_marginTop="2dp" />
+        android:layout_marginTop="@dimen/setup_step_horizontal_line_height" />
 </LinearLayout>
diff --git a/java/res/layout/setup_steps_cards.xml b/java/res/layout/setup_steps_cards.xml
index 17207d3..6c46461 100644
--- a/java/res/layout/setup_steps_cards.xml
+++ b/java/res/layout/setup_steps_cards.xml
@@ -23,7 +23,7 @@
         android:id="@+id/setup_step_bullets"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="16dp"
+        android:layout_marginTop="@dimen/setup_step_vertical_padding"
         android:orientation="horizontal">
         <TextView
             android:id="@+id/setup_step1_bullet"
@@ -40,8 +40,7 @@
     </LinearLayout>
     <com.android.inputmethod.latin.setup.SetupStepIndicatorView
         android:id="@+id/setup_step_indicator"
-        android:layout_width="match_parent"
-        android:layout_height="24dp" />
+        style="@style/setupStepIndicatorStyle" />
     <FrameLayout
         android:id="@+id/setup_steps_pane"
         android:layout_width="match_parent"
@@ -60,5 +59,5 @@
         android:id="@+id/setup_finish"
         android:text="@string/setup_finish_action"
         style="@style/setupStepActionLabelStyle"
-        android:layout_marginTop="2dp" />
+        android:layout_marginTop="@dimen/setup_step_horizontal_line_height" />
 </merge>
diff --git a/java/res/layout/setup_welcome_video.xml b/java/res/layout/setup_welcome_video.xml
index 3aa4f3c..da59ec8 100644
--- a/java/res/layout/setup_welcome_video.xml
+++ b/java/res/layout/setup_welcome_video.xml
@@ -30,8 +30,8 @@
         <VideoView
             android:id="@+id/setup_welcome_video"
             android:layout_weight="@integer/setup_welcome_video_weight_in_screen"
-            android:layout_marginTop="24dp"
-            android:layout_marginBottom="24dp"
+            android:layout_marginTop="@dimen/setup_welcome_video_vertical_margin"
+            android:layout_marginBottom="@dimen/setup_welcome_video_vertical_margin"
             android:layout_width="0dp"
             android:layout_height="wrap_content" />
         <View
diff --git a/java/res/layout/setup_wizard.xml b/java/res/layout/setup_wizard.xml
index e766e4c..176f836 100644
--- a/java/res/layout/setup_wizard.xml
+++ b/java/res/layout/setup_wizard.xml
@@ -24,8 +24,8 @@
     android:background="@color/setup_background"
     android:paddingLeft="@dimen/setup_horizontal_padding"
     android:paddingRight="@dimen/setup_horizontal_padding"
-    android:paddingTop="16dp"
-    android:paddingBottom="16dp">
+    android:paddingTop="@dimen/setup_vertical_padding"
+    android:paddingBottom="@dimen/setup_vertical_padding">
     <include
         android:id="@+id/setup_welcome_screen"
         layout="@layout/setup_welcome_screen" />
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index d4fff62..4e2936c 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -58,9 +58,11 @@
     <bool name="config_sliding_key_input_enabled">true</bool>
     <!-- Sliding key input preview parameters -->
     <dimen name="config_sliding_key_input_preview_width">8.0dp</dimen>
-    <!-- Percentages of sliding key input preview body and shadow, in proportion to the width. -->
-    <integer name="config_sliding_key_input_preview_body_ratio">80</integer>
-    <integer name="config_sliding_key_input_preview_shadow_ratio">50</integer>
+    <!-- Percentages of sliding key input preview body and shadow, in proportion to the width.
+         A negative value of the shadow ratio disables drawing shadow. -->
+    <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
+    <integer name="config_sliding_key_input_preview_body_ratio">100</integer>
+    <integer name="config_sliding_key_input_preview_shadow_ratio">-1</integer>
     <integer name="config_key_repeat_start_timeout">400</integer>
     <integer name="config_key_repeat_interval">50</integer>
     <integer name="config_default_longpress_key_timeout">300</integer>  <!-- milliseconds -->
diff --git a/java/res/values/dimens.xml b/java/res/values/dimens.xml
index db33ad8..e9b34aa 100644
--- a/java/res/values/dimens.xml
+++ b/java/res/values/dimens.xml
@@ -103,9 +103,11 @@
     <!-- Gesture preview trail parameters -->
     <dimen name="gesture_preview_trail_start_width">10.0dp</dimen>
     <dimen name="gesture_preview_trail_end_width">2.5dp</dimen>
-    <!-- Percentages of gesture preview taril body and shadow, in proportion to the trail width. -->
-    <integer name="gesture_preview_trail_body_ratio">80</integer>
-    <integer name="gesture_preview_trail_shadow_ratio">50</integer>
+    <!-- Percentages of gesture preview taril body and shadow, in proportion to the trail width.
+         A negative value of the shadow ratio disables drawing shadow. -->
+    <!-- TODO: May use the shadow to alleviate rugged trail drawing. -->
+    <integer name="gesture_preview_trail_body_ratio">100</integer>
+    <integer name="gesture_preview_trail_shadow_ratio">-1</integer>
     <!-- Gesture floating preview text parameters -->
     <dimen name="gesture_floating_preview_text_size">24dp</dimen>
     <dimen name="gesture_floating_preview_text_offset">73dp</dimen>
diff --git a/java/res/values/setup-dimens.xml b/java/res/values/setup-dimens.xml
index 1634777..dac5440 100644
--- a/java/res/values/setup-dimens.xml
+++ b/java/res/values/setup-dimens.xml
@@ -17,9 +17,21 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
     <dimen name="setup_title_text_size">46sp</dimen>
     <dimen name="setup_welcome_description_text_size">26sp</dimen>
+    <dimen name="setup_step_bullet_text_size">22sp</dimen>
+    <dimen name="setup_step_indicator_height">24dp</dimen>
+    <dimen name="setup_step_title_text_size">22sp</dimen>
+    <dimen name="setup_step_instruction_text_size">14sp</dimen>
+    <dimen name="setup_step_action_text_size">18sp</dimen>
+    <dimen name="setup_vertical_padding">16dp</dimen>
     <dimen name="setup_horizontal_padding">16dp</dimen>
+    <dimen name="setup_step_action_height">48dp</dimen>
+    <dimen name="setup_step_horizontal_padding">24dp</dimen>
+    <dimen name="setup_step_horizontal_padding_half">12dp</dimen>
+    <dimen name="setup_step_vertical_padding">16dp</dimen>
+    <dimen name="setup_step_horizontal_line_height">2dp</dimen>
     <integer name="setup_title_weight_in_screen">40</integer>
     <integer name="setup_body_weight_in_screen">60</integer>
+    <dimen name="setup_welcome_video_vertical_margin">24dp</dimen>
     <integer name="setup_welcome_video_weight_in_screen">80</integer>
     <integer name="setup_welcome_video_left_padding_weight_in_screen">10</integer>
     <integer name="setup_welcome_video_right_padding_weight_in_screen">10</integer>
diff --git a/java/res/values/setup-styles-common.xml b/java/res/values/setup-styles-common.xml
index e9c72eb..f5f59dd 100644
--- a/java/res/values/setup-styles-common.xml
+++ b/java/res/values/setup-styles-common.xml
@@ -24,9 +24,13 @@
     <style name="setupWelcomeDescritpionStyle" parent="setupTitleStyle">
         <item name="android:textSize">@dimen/setup_welcome_description_text_size</item>
     </style>
+    <style name="setupStepIndicatorStyle">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">@dimen/setup_step_indicator_height</item>
+    </style>
     <style name="setupStepBulletStyle">
         <item name="android:textColor">@color/setup_text_dark</item>
-        <item name="android:textSize">22sp</item>
+        <item name="android:textSize">@dimen/setup_step_bullet_text_size</item>
         <item name="android:layout_width">0dp</item>
         <item name="android:layout_weight">1.0</item>
         <item name="android:layout_height">wrap_content</item>
@@ -37,32 +41,32 @@
         <item name="android:background">@color/setup_step_background</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">wrap_content</item>
-        <item name="android:paddingLeft">24dp</item>
-        <item name="android:paddingRight">24dp</item>
+        <item name="android:paddingLeft">@dimen/setup_step_horizontal_padding</item>
+        <item name="android:paddingRight">@dimen/setup_step_horizontal_padding</item>
     </style>
     <style name="setupStepTitleStyle" parent="setupStepBaseStyle">
-        <item name="android:textSize">22sp</item>
+        <item name="android:textSize">@dimen/setup_step_title_text_size</item>
     </style>
     <style name="setupStepInstructionStyle" parent="setupStepBaseStyle">
-        <item name="android:textSize">14sp</item>
+        <item name="android:textSize">@dimen/setup_step_instruction_text_size</item>
     </style>
     <style name="setupStepStartIndicatorStyle">
         <item name="android:layout_width">24dp</item>
-        <item name="android:layout_height">48dp</item>
+        <item name="android:layout_height">@dimen/setup_step_action_height</item>
     </style>
     <style name="setupStepActionLabelStyleCommon" parent="setupStepBaseStyle">
         <item name="android:textColor">@color/setup_step_action_color</item>
         <item name="android:background">@drawable/setup_step_action_background</item>
-        <item name="android:layout_height">48dp</item>
-        <item name="android:paddingLeft">12dp</item>
-        <item name="android:textSize">18sp</item>
-        <item name="android:drawablePadding">12dp</item>
+        <item name="android:layout_height">@dimen/setup_step_action_height</item>
+        <item name="android:paddingLeft">@dimen/setup_step_horizontal_padding_half</item>
+        <item name="android:textSize">@dimen/setup_step_action_text_size</item>
+        <item name="android:drawablePadding">@dimen/setup_step_horizontal_padding_half</item>
         <item name="android:gravity">center_vertical</item>
         <item name="android:clickable">true</item>
         <item name="android:focusable">true</item>
     </style>
     <style name="setupStepStartActionLabelStyleCommon" parent="setupStepActionLabelStyleCommon">
-        <item name="android:paddingLeft">24dp</item>
-        <item name="android:paddingRight">24dp</item>
+        <item name="android:paddingLeft">@dimen/setup_step_horizontal_padding</item>
+        <item name="android:paddingRight">@dimen/setup_step_horizontal_padding</item>
     </style>
 </resources>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 600621e..d8a88a8 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -459,7 +459,7 @@
     <string name="setup_step1_bullet" translatable="false">1</string>
     <!-- Title of the 1st step in the setup wizard. [CHAR LIMIT=64] -->
     <string name="setup_step1_title">"Enable <xliff:g id="application_name">%s</xliff:g>"</string>
-    <!-- Detailed instruction of the 1st step in the setup wizard. [CHAR LIMIT=80] -->
+    <!-- Detailed instruction of the 1st step in the setup wizard. [CHAR LIMIT=120] -->
     <string name="setup_step1_instruction">"Please check \"<xliff:g id="application_name">%s</xliff:g>\" in your Language &amp; input settings. This will authorize it to run on your device."</string>
     <!-- The label of the button that triggers the Language & input settings in order to enable the keyboard. [CHAR_LIMIT=64] -->
     <string name="setup_step1_action">Enable in Settings</string>
@@ -467,7 +467,7 @@
     <string name="setup_step2_bullet" translatable="false">2</string>
     <!-- Title of the 2nd step in the setup wizard. [CHAR LIMIT=64] -->
     <string name="setup_step2_title">"Switch to <xliff:g id="application_name">%s</xliff:g>"</string>
-    <!-- Detailed instruction of the 2nd step in the setup wizard. [CHAR LIMIT=80] -->
+    <!-- Detailed instruction of the 2nd step in the setup wizard. [CHAR LIMIT=120] -->
     <string name="setup_step2_instruction">"Next, select \"<xliff:g id="application_name">%s</xliff:g>\" as your active text-input method."</string>
     <!-- The label of the button that triggers the choose input method dialog in order to select the keyboard. [CHAR_LIMIT=64] -->
     <string name="setup_step2_action">Switch input methods</string>
@@ -475,14 +475,16 @@
     <string name="setup_step3_bullet" translatable="false">3</string>
     <!-- Title of the 3rd step in the setup wizard. [CHAR LIMIT=64] -->
     <string name="setup_step3_title">"Congratulations, you're all set!"</string>
-    <!-- Detailed instruction of the 3rd step in the setup wizard. [CHAR LIMIT=80] -->
+    <!-- Detailed instruction of the 3rd step in the setup wizard. [CHAR LIMIT=120] -->
     <string name="setup_step3_instruction">Now you can type in all your favorite apps with <xliff:g id="application_name">%s</xliff:g>.</string>
     <!-- The label of the button that triggers the screen for configuaring additional languages of the keyboard. [CHAR_LIMIT=64] -->
     <string name="setup_step3_action">Configure additional languages</string>
     <!-- The label of the button that finishes the setup wizard. [CHAR_LIMIT=64] -->
     <string name="setup_finish_action">Finished</string>
     <!-- Option to show setup wizard icon. [CHAR LIMIT=30]-->
-    <string name="show_setup_wizard_icon">Show setup wizard icon</string>
+    <string name="show_setup_wizard_icon">Show app icon</string>
+    <!-- Description for the option to show setup wizard application icon of this IME in the laucher. [CHAR_LIMIT=65] -->
+    <string name="show_setup_wizard_icon_summary">Display application icon in the launcher</string>
 
     <!-- The dictionary provider application name. Visible in Settings/Applications/Manage applications. -->
     <string name="app_name">Dictionary Provider</string>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index a95255e..eea90f9 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -177,11 +177,12 @@
                 android:key="pref_keypress_sound_volume"
                 android:title="@string/prefs_keypress_sound_volume_settings"
                 latin:maxValue="100" /> <!-- percent -->
-            <!-- The show setup wizard icon settings shouldn't be persistent and the default value
-                 is added programmatically. -->
+            <!-- The settigs for showing setup wizard application icon shouldn't be persistent and
+                 the default value is added programmatically. -->
             <CheckBoxPreference
                 android:key="pref_show_setup_wizard_icon"
-                android:title="@string/show_setup_wizard_icon" />
+                android:title="@string/show_setup_wizard_icon"
+                android:summary="@string/show_setup_wizard_icon_summary" />
         </PreferenceScreen>
         <PreferenceScreen
             android:key="send_feedback"