Add Material Light theme

Bug: 15782668
Change-Id: Id2ae47cfb2065d73f13701b9c6a041129dfd08ae
diff --git a/java/res/values/colors.xml b/java/res/values/colors.xml
index c85710d..ad7a04e 100644
--- a/java/res/values/colors.xml
+++ b/java/res/values/colors.xml
@@ -40,6 +40,21 @@
     <color name="typed_word_color_klp">#D8F0F0F0</color>
     <color name="suggested_word_color_klp">#B2F0F0F0</color>
     <color name="highlight_translucent_color_klp">#99E0E0E0</color>
+    <!-- Color resources for LXX_Light theme. -->
+    <color name="key_text_color_lxx_light">#546E7A</color>
+    <color name="key_text_inactive_color_lxx_light">#99546E7A</color>
+    <color name="key_hint_letter_color_lxx_light">#99546E7A</color>
+    <color name="highlight_color_lxx_light">#4DB6AC</color>
+    <color name="typed_word_color_lxx_light">#D84DB6AC</color>
+    <color name="suggested_word_color_lxx_light">#B24DB6AC</color>
+    <color name="highlight_translucent_color_lxx_light">#994DB6AC</color>
+    <color name="keyboard_background_lxx_light">#ECEFF1</color>
+    <color name="key_background_lxx_light">#ECEFF1</color>
+    <color name="key_background_pressed_lxx_light">#26546E7A</color>
+    <color name="suggestions_strip_background_lxx_light">#E4E7E9</color>
+    <color name="suggested_word_background_selected_lxx_light">#26546E7A</color>
+    <color name="gesture_floating_preview_color_lxx_light">#C0000000</color>
+    <color name="emoji_tab_page_indicator_background_lxx_light">#E4E7E9</color>
     <!-- Color resources for LXX_Dark theme. -->
     <color name="key_text_color_lxx_dark">#B3FFFFFF</color>
     <color name="key_text_inactive_color_lxx_dark">#66FFFFFF</color>
diff --git a/java/res/values/keyboard-icons-lxx-light.xml b/java/res/values/keyboard-icons-lxx-light.xml
new file mode 100644
index 0000000..651e75c
--- /dev/null
+++ b/java/res/values/keyboard-icons-lxx-light.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="KeyboardIcons.LXX_Light">
+        <!-- Keyboard icons -->
+        <!-- TODO: Update those icons for LXX_Light theme. -->
+        <item name="iconShiftKey">@drawable/sym_keyboard_shift_lxx_light</item>
+        <item name="iconDeleteKey">@drawable/sym_keyboard_delete_lxx_light</item>
+        <item name="iconSettingsKey">@drawable/sym_keyboard_settings_lxx_light</item>
+        <item name="iconSpaceKey">@drawable/sym_keyboard_spacebar_lxx_light</item>
+        <item name="iconEnterKey">@drawable/sym_keyboard_return_lxx_light</item>
+        <item name="iconGoKey">@drawable/sym_keyboard_go_lxx_light</item>
+        <item name="iconSearchKey">@drawable/sym_keyboard_search_lxx_light</item>
+        <item name="iconSendKey">@drawable/sym_keyboard_send_lxx_light</item>
+        <item name="iconNextKey">@drawable/sym_keyboard_next_lxx_light</item>
+        <item name="iconDoneKey">@drawable/sym_keyboard_done_lxx_light</item>
+        <item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_light</item>
+        <item name="iconTabKey">@drawable/sym_keyboard_tab_holo_dark</item>
+        <item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_light</item>
+        <item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_holo_dark</item>
+        <item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_lxx_dark</item>
+        <item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_light</item>
+        <item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_lxx_light</item>
+        <item name="iconZwnjKey">@drawable/sym_keyboard_zwnj_holo_dark</item>
+        <item name="iconZwjKey">@drawable/sym_keyboard_zwj_holo_dark</item>
+        <item name="iconEmojiKey">@drawable/sym_keyboard_smiley_lxx_light</item>
+    </style>
+</resources>
diff --git a/java/res/values/keyboard-themes.xml b/java/res/values/keyboard-themes.xml
index 28a34c3..9d772c4 100644
--- a/java/res/values/keyboard-themes.xml
+++ b/java/res/values/keyboard-themes.xml
@@ -20,15 +20,15 @@
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <!-- For keyboard color scheme option dialog. -->
     <string-array name="keyboard_theme_names" translatable="false">
-        <!-- TODO: Implement Material Light theme. -->
+        <item>@string/keyboard_theme_material_light</item>
         <item>@string/keyboard_theme_material_dark</item>
         <item>@string/keyboard_theme_holo_white</item>
         <item>@string/keyboard_theme_holo_blue</item>
     </string-array>
     <!-- An element must be a keyboard theme id of {@link KeyboardTheme#THEME_ID_*}. -->
     <string-array name="keyboard_theme_ids" translatable="false">
-        <!-- TODO: Implement Material Light theme. -->
         <item>3</item>
+        <item>4</item>
         <item>2</item>
         <item>0</item>
     </string-array>
diff --git a/java/res/values/themes-lxx-dark.xml b/java/res/values/themes-lxx-dark.xml
index 8d6be3b..c04e04d 100644
--- a/java/res/values/themes-lxx-dark.xml
+++ b/java/res/values/themes-lxx-dark.xml
@@ -34,7 +34,7 @@
         parent="Keyboard"
     >
         <!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
-        <item name="themeId">3</item>
+        <item name="themeId">4</item>
         <item name="keyboardTopPadding">@fraction/config_keyboard_top_padding_holo</item>
         <item name="keyboardBottomPadding">@fraction/config_keyboard_bottom_padding_holo</item>
         <item name="horizontalGap">@fraction/config_key_horizontal_gap_holo</item>
diff --git a/java/res/values/themes-lxx-light.xml b/java/res/values/themes-lxx-light.xml
new file mode 100644
index 0000000..3695f80
--- /dev/null
+++ b/java/res/values/themes-lxx-light.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="KeyboardTheme.LXX_Light" parent="KeyboardIcons.LXX_Light">
+        <item name="keyboardStyle">@style/Keyboard.LXX_Light</item>
+        <item name="keyboardViewStyle">@style/KeyboardView.LXX_Light</item>
+        <item name="mainKeyboardViewStyle">@style/MainKeyboardView.LXX_Light</item>
+        <item name="emojiPalettesViewStyle">@style/EmojiPalettesView.LXX_Light</item>
+        <item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.LXX_Light</item>
+        <item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.LXX_Light</item>
+        <item name="suggestionStripViewStyle">@style/SuggestionStripView.LXX_Light</item>
+        <item name="suggestionWordStyle">@style/SuggestionWord.LXX_Light</item>
+    </style>
+    <style
+        name="Keyboard.LXX_Light"
+        parent="Keyboard"
+    >
+        <!-- This should be aligned with KeyboardSwitcher.KEYBOARD_THEMES[] -->
+        <item name="themeId">3</item>
+        <item name="keyboardTopPadding">@fraction/config_keyboard_top_padding_holo</item>
+        <item name="keyboardBottomPadding">@fraction/config_keyboard_bottom_padding_holo</item>
+        <item name="horizontalGap">@fraction/config_key_horizontal_gap_holo</item>
+        <item name="verticalGap">@fraction/config_key_vertical_gap_holo</item>
+        <item name="touchPositionCorrectionData">@array/touch_position_correction_data_holo</item>
+    </style>
+    <style
+        name="KeyboardView.LXX_Light"
+        parent="KeyboardView"
+    >
+        <item name="android:background">@color/keyboard_background_lxx_light</item>
+        <item name="keyBackground">@drawable/btn_keyboard_key_lxx_light</item>
+        <item name="functionalKeyBackground">@drawable/btn_keyboard_key_functional_lxx_light</item>
+        <item name="spacebarBackground">@drawable/btn_keyboard_spacebar_lxx_light</item>
+        <item name="spacebarIconWidthRatio">0.9</item>
+        <item name="keyTypeface">normal</item>
+        <item name="keyTextColor">@color/key_text_color_lxx_light</item>
+        <item name="keyTextInactivatedColor">@color/key_text_inactive_color_lxx_light</item>
+        <item name="functionalTextColor">@color/key_hint_letter_color_lxx_light</item>
+        <item name="keyHintLetterColor">@color/key_hint_letter_color_lxx_light</item>
+        <item name="keyHintLabelColor">@color/key_text_inactive_color_lxx_light</item>
+        <item name="keyShiftedLetterHintInactivatedColor">@color/key_text_inactive_color_lxx_light</item>
+        <item name="keyShiftedLetterHintActivatedColor">@color/key_text_color_lxx_light</item>
+        <item name="keyPreviewTextColor">@color/key_text_color_lxx_light</item>
+        <!-- A negative value to disable key text shadow layer. -->
+        <item name="keyTextShadowRadius">-1.0</item>
+    </style>
+    <style
+        name="MainKeyboardView.LXX_Light"
+        parent="KeyboardView.LXX_Light"
+    >
+        <item name="keyPreviewBackground">@drawable/keyboard_key_feedback_lxx_light</item>
+        <item name="keyPreviewOffset">@dimen/config_key_preview_offset_holo</item>
+        <item name="gestureFloatingPreviewTextColor">@color/highlight_color_lxx_light</item>
+        <item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_lxx_light</item>
+        <item name="gestureTrailColor">@color/highlight_color_lxx_light</item>
+        <item name="slidingKeyInputPreviewColor">@color/highlight_translucent_color_lxx_light</item>
+        <item name="languageOnSpacebarTextColor">@color/key_text_inactive_color_lxx_light</item>
+        <!-- A negative value to disable text shadow layer. -->
+        <item name="languageOnSpacebarTextShadowRadius">-1.0</item>
+    </style>
+    <!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
+         for instance delete button, need themed {@link KeyboardView} attributes. -->
+    <style
+        name="EmojiPalettesView.LXX_Light"
+        parent="MainKeyboardView.LXX_Light"
+    >
+        <item name="categoryIndicatorEnabled">false</item>
+        <item name="categoryPageIndicatorColor">@color/highlight_color_lxx_light</item>
+        <item name="categoryPageIndicatorBackground">@color/emoji_tab_page_indicator_background_lxx_light</item>
+        <!-- TODO: Update those icons to LXX_Light theme. -->
+        <item name="iconEmojiRecentsTab">@drawable/ic_emoji_recents_holo_dark</item>
+        <item name="iconEmojiCategory1Tab">@drawable/ic_emoji_people_holo_dark</item>
+        <item name="iconEmojiCategory2Tab">@drawable/ic_emoji_objects_holo_dark</item>
+        <item name="iconEmojiCategory3Tab">@drawable/ic_emoji_nature_holo_dark</item>
+        <item name="iconEmojiCategory4Tab">@drawable/ic_emoji_places_holo_dark</item>
+        <item name="iconEmojiCategory5Tab">@drawable/ic_emoji_symbols_holo_dark</item>
+        <item name="iconEmojiCategory6Tab">@drawable/ic_emoji_emoticons_holo_dark</item>
+    </style>
+    <style
+        name="MoreKeysKeyboard.LXX_Light"
+        parent="Keyboard.LXX_Light"
+    >
+        <item name="keyboardTopPadding">0%p</item>
+        <item name="keyboardBottomPadding">0%p</item>
+        <item name="horizontalGap">0%p</item>
+        <item name="touchPositionCorrectionData">@null</item>
+    </style>
+    <style
+        name="MoreKeysKeyboardView.LXX_Light"
+        parent="KeyboardView.LXX_Light"
+    >
+        <item name="android:background">@drawable/keyboard_popup_panel_background_lxx_light</item>
+        <!-- Reuse KLP key background -->
+        <item name="keyBackground">@drawable/btn_keyboard_key_popup_klp</item>
+        <item name="keyTypeface">normal</item>
+        <item name="verticalCorrection">@dimen/config_more_keys_keyboard_vertical_correction_holo</item>
+    </style>
+    <style
+        name="SuggestionStripView.LXX_Light"
+        parent="KeyboardView.LXX_Light"
+    >
+        <item name="suggestionsCountInStrip">@integer/config_suggestions_count_in_strip</item>
+        <item name="centerSuggestionPercentile">@fraction/config_center_suggestion_percentile</item>
+        <item name="maxMoreSuggestionsRow">@integer/config_max_more_suggestions_row</item>
+        <item name="minMoreSuggestionsWidth">@fraction/config_min_more_suggestions_width</item>
+        <item name="android:background">@color/suggestions_strip_background_lxx_light</item>
+        <item name="android:src">@drawable/suggestions_strip_divider_lxx_light</item>
+        <item name="suggestionStripOptions">autoCorrectBold|validTypedWordBold</item>
+        <item name="colorValidTypedWord">@color/typed_word_color_lxx_light</item>
+        <item name="colorTypedWord">@color/typed_word_color_lxx_light</item>
+        <item name="colorAutoCorrect">@color/highlight_color_lxx_light</item>
+        <item name="colorSuggested">@color/suggested_word_color_lxx_light</item>
+        <item name="alphaObsoleted">70%</item>
+    </style>
+    <style
+        name="SuggestionWord.LXX_Light"
+        parent="SuggestionWord"
+    >
+        <item name="android:background">@drawable/btn_suggestion_lxx_light</item>
+        <item name="android:textColor">@color/highlight_color_lxx_light</item>
+    </style>
+</resources>