Use XML animator definition

Change-Id: Ic2f6d3f8fdd2c0b0a00f004f49f95b00d474ee4b
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 8df51d6..e56778a 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -132,14 +132,8 @@
         <attr name="spacebarTextRatio" format="fraction" />
         <attr name="spacebarTextColor" format="color" />
         <attr name="spacebarTextShadowColor" format="color" />
-        <!-- Animation parameters for spacebar language label. -->
-        <attr name="durationOfFadeoutLanguageOnSpacebar" format="integer|enum">
-            <!-- This should be aligned with LatinKeyboardView.LANGUAGE_ON_SPACEBAR_* -->
-            <enum name="neverDisplay" value="0" />
-            <enum name="alwaysDisplay" value="-1" />
-        </attr>
-        <attr name="delayBeforeFadeoutLangageOnSpacebar" format="integer" />
-        <attr name="finalAlphaOfLanguageOnSpacebar" format="integer" />
+        <!-- Fadeout animator for spacebar language label. -->
+        <attr name="languageOnSpacebarFadeoutAnimator" format="reference" />
         <!-- Key detection hysteresis distance. -->
         <attr name="keyHysteresisDistance" format="dimension" />
         <!-- Touch noise threshold time in millisecond -->
diff --git a/java/res/values/styles.xml b/java/res/values/styles.xml
index eaca642..741ad99 100644
--- a/java/res/values/styles.xml
+++ b/java/res/values/styles.xml
@@ -78,9 +78,7 @@
         <item name="longPressSpaceKeyTimeout">@integer/config_long_press_space_key_timeout</item>
         <item name="ignoreSpecialKeyTimeout">@integer/config_ignore_special_key_timeout</item>
         <item name="showMoreKeysKeyboardAtTouchedPoint">@bool/config_show_more_keys_keyboard_at_touched_point</item>
-        <item name="durationOfFadeoutLanguageOnSpacebar">200</item>
-        <item name="delayBeforeFadeoutLangageOnSpacebar">1200</item>
-        <item name="finalAlphaOfLanguageOnSpacebar">128</item>
+        <item name="languageOnSpacebarFadeoutAnimator">@anim/language_on_spacebar_fadeout</item>
     </style>
     <style
         name="LatinKeyboardView"