Refactor Emoji tab indicators to refer keyboard theme

Bug: 14419121
Change-Id: I7086923fff153039c2d011bbccbfd04eb687a76a
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 80bb6f2..307ef13 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -30,6 +30,10 @@
         <attr name="keyPreviewTextViewStyle" format="reference"/>
         <!-- EmojiPalettesView style -->
         <attr name="emojiPalettesViewStyle" format="reference" />
+        <!-- TabWidget of EmojiPlettesView style -->
+        <attr name="emojiTabWidgetStyle" format="reference" />
+        <!-- EmojiCategoryPageIndicatorView style -->
+        <attr name="emojiCategoryPageIndicatorViewStyle" format="reference" />
         <!-- MoreKeysKeyboard style -->
         <attr name="moreKeysKeyboardStyle" format="reference" />
         <!-- MoreKeysKeyboardView style -->
@@ -181,6 +185,10 @@
         <attr name="iconEmojiCategory6Tab" format="reference" />
     </declare-styleable>
 
+    <declare-styleable name="EmojiCategoryPageIndicatorView">
+        <attr name="emojiCategoryPageIndicatorColor" format="color" />
+    </declare-styleable>
+
     <declare-styleable name="SuggestionStripView">
         <attr name="suggestionStripOptions" format="integer">
             <!-- This should be aligned with SuggestionStripLayoutHelper.AUTO_CORRECT_* and etc. -->
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index 12cb71f..0eee08d 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -34,6 +34,7 @@
     <color name="spacebar_text_color_holo">#FFC0C0C0</color>
     <color name="spacebar_text_shadow_color_holo">#80000000</color>
     <color name="gesture_floating_preview_color_holo">#C0000000</color>
+    <color name="emoji_tab_page_indicator_background_holo">#111111</color>
     <!-- Color resources for KLP theme. Base color = F0F0F0 -->
     <color name="highlight_color_klp">#FFF0F0F0</color>
     <color name="typed_word_color_klp">#D8F0F0F0</color>
@@ -53,12 +54,11 @@
     <color name="suggestions_strip_background_lxx_dark">#263238</color>
     <color name="suggested_word_background_selected_lxx_dark">#384248</color>
     <color name="gesture_floating_preview_color_lxx_dark">#C0000000</color>
+    <color name="emoji_tab_page_indicator_background_lxx_dark">#263238</color>
     <!-- Color resources for setup wizard and tutorial -->
     <color name="setup_background">#FFEBEBEB</color>
     <color name="setup_text_dark">#FF707070</color>
     <color name="setup_text_action">@android:color/holo_blue_light</color>
     <color name="setup_step_background">@android:color/background_light</color>
     <color name="setup_welcome_video_margin_color">#FFCCCCCC</color>
-    <color name="emoji_category_page_id_background_holo">#FF000000</color>
-    <color name="emoji_category_page_id_foreground_holo">#80FFFFFF</color>
 </resources>
diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml
index df26fb3..c5d3f55 100644
--- a/java/res/values/themes-common.xml
+++ b/java/res/values/themes-common.xml
@@ -110,6 +110,8 @@
     <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
          for instance delete button, need themed {@link KeyboardView} attributes. -->
     <style name="EmojiPalettesView" />
+    <style name="EmojiTabWidget" />
+    <style name="EmojiCategoryPageIndicatorView" />
     <style name="MoreKeysKeyboard" />
     <style
         name="MoreKeysKeyboardView"
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index 00a4de5..f7ca5a3 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -25,6 +25,8 @@
         <item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
         <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.ICS</item>
         <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.ICS</item>
+        <item name="emojiTabWidgetStyle">@style/EmojiTabWidget.ICS</item>
+        <item name="emojiCategoryPageIndicatorViewStyle">@style/EmojiCategoryPageIndicatorView.ICS</item>
         <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
         <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
         <item name="suggestionStripViewStyle">@style/SuggestionStripView.ICS</item>
@@ -95,6 +97,15 @@
         <item name="iconEmojiCategory5Tab">@drawable/ic_emoji_symbols_holo_dark</item>
         <item name="iconEmojiCategory6Tab">@drawable/ic_emoji_emoticons_holo_dark</item>
     </style>
+    <style name="EmojiCategoryPageIndicatorView.ICS">
+        <item name="android:background">@color/emoji_tab_page_indicator_background_holo</item>
+        <item name="emojiCategoryPageIndicatorColor">@color/highlight_color_ics</item>
+    </style>
+    <style name="EmojiTabWidget.ICS">
+        <item name="android:background">@drawable/emoji_category_tab_selected_ics</item>
+        <item name="android:tabStripLeft">@drawable/emoji_category_tab_unselected_holo_dark</item>
+        <item name="android:tabStripRight">@drawable/emoji_category_tab_unselected_holo_dark</item>
+    </style>
     <style
         name="MoreKeysKeyboard.ICS"
         parent="Keyboard.ICS"
diff --git a/java/res/values/themes-klp.xml b/java/res/values/themes-klp.xml
index b206560..96d0478 100644
--- a/java/res/values/themes-klp.xml
+++ b/java/res/values/themes-klp.xml
@@ -25,6 +25,8 @@
         <item name="mainKeyboardViewStyle">@style/MainKeyboardView.KLP</item>
         <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.KLP</item>
         <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.KLP</item>
+        <item name="emojiTabWidgetStyle">@style/EmojiTabWidget.KLP</item>
+        <item name="emojiCategoryPageIndicatorViewStyle">@style/EmojiCategoryPageIndicatorView.KLP</item>
         <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.KLP</item>
         <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.KLP</item>
         <item name="suggestionStripViewStyle">@style/SuggestionStripView.KLP</item>
@@ -95,6 +97,15 @@
         <item name="iconEmojiCategory5Tab">@drawable/ic_emoji_symbols_holo_dark</item>
         <item name="iconEmojiCategory6Tab">@drawable/ic_emoji_emoticons_holo_dark</item>
     </style>
+    <style name="EmojiCategoryPageIndicatorView.KLP">
+        <item name="android:background">@color/emoji_tab_page_indicator_background_holo</item>
+        <item name="emojiCategoryPageIndicatorColor">@color/highlight_color_klp</item>
+    </style>
+    <style name="EmojiTabWidget.KLP">
+        <item name="android:background">@drawable/emoji_category_tab_selected_klp</item>
+        <item name="android:tabStripLeft">@drawable/emoji_category_tab_unselected_holo_dark</item>
+        <item name="android:tabStripRight">@drawable/emoji_category_tab_unselected_holo_dark</item>
+    </style>
     <style
         name="MoreKeysKeyboard.KLP"
         parent="Keyboard.KLP"
diff --git a/java/res/values/themes-lxx-dark.xml b/java/res/values/themes-lxx-dark.xml
index 05dd659..7fb122a 100644
--- a/java/res/values/themes-lxx-dark.xml
+++ b/java/res/values/themes-lxx-dark.xml
@@ -25,6 +25,8 @@
         <item name="mainKeyboardViewStyle">@style/MainKeyboardView.LXX_Dark</item>
         <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.LXX_Dark</item>
         <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.LXX_Dark</item>
+        <item name="emojiTabWidgetStyle">@style/EmojiTabWidget.LXX_Dark</item>
+        <item name="emojiCategoryPageIndicatorViewStyle">@style/EmojiCategoryPageIndicatorView.LXX_Dark</item>
         <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.LXX_Dark</item>
         <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.LXX_Dark</item>
         <item name="suggestionStripViewStyle">@style/SuggestionStripView.LXX_Dark</item>
@@ -97,6 +99,15 @@
         <item name="iconEmojiCategory5Tab">@drawable/ic_emoji_symbols_holo_dark</item>
         <item name="iconEmojiCategory6Tab">@drawable/ic_emoji_emoticons_holo_dark</item>
     </style>
+    <style name="EmojiCategoryPageIndicatorView.LXX_Dark">
+        <item name="android:background">@color/emoji_tab_page_indicator_background_lxx_dark</item>
+        <item name="emojiCategoryPageIndicatorColor">@color/highlight_color_lxx_dark</item>
+    </style>
+    <style name="EmojiTabWidget.LXX_Dark">
+        <item name="android:background">@drawable/emoji_category_tab_selected_lxx_dark</item>
+        <item name="android:tabStripLeft">@drawable/emoji_category_tab_unselected_lxx_dark</item>
+        <item name="android:tabStripRight">@drawable/emoji_category_tab_unselected_lxx_dark</item>
+    </style>
     <style
         name="MoreKeysKeyboard.LXX_Dark"
         parent="Keyboard.LXX_Dark"