Remove unnecessary alpha attributes of SuggestionStripView

Change-Id: I78701403d7bd21928c4b459bb336a565f386ebcc
main
Tadashi G. Takaoka 2013-08-21 12:44:30 +09:00
parent 2c7a3e0405
commit 1f39d36458
4 changed files with 11 additions and 29 deletions

View File

@ -169,10 +169,6 @@
<attr name="colorTypedWord" format="color" />
<attr name="colorAutoCorrect" format="color" />
<attr name="colorSuggested" format="color" />
<attr name="alphaValidTypedWord" format="fraction" />
<attr name="alphaTypedWord" format="fraction" />
<attr name="alphaAutoCorrect" format="fraction" />
<attr name="alphaSuggested" format="fraction" />
<attr name="alphaObsoleted" format="fraction" />
<attr name="suggestionsCountInStrip" format="integer" />
<attr name="centerSuggestionPercentile" format="fraction" />

View File

@ -41,7 +41,9 @@
<color name="spacebar_text_shadow_color_stone">#D0FFFFFF</color>
<!-- Color resources for IceCreamSandwich theme. -->
<!-- android:color/holo_blue_light value is #FF33B5E5 -->
<color name="highlight_color_ics">@android:color/holo_blue_light</color>
<color name="highlight_color_ics">#FF33B5E5</color>
<color name="typed_word_color_ics">#D833B5E5</color>
<color name="suggested_word_color_ics">#B233B5E5</color>
<color name="highlight_translucent_color_ics">#9933B5E5</color>
<color name="key_text_color_ics">@android:color/white</color>
<color name="key_text_shadow_color_ics">@android:color/transparent</color>
@ -52,7 +54,6 @@
<color name="key_shifted_letter_hint_activated_color_ics">@android:color/white</color>
<color name="spacebar_text_color_ics">#FFC0C0C0</color>
<color name="spacebar_text_shadow_color_ics">#80000000</color>
<color name="typed_word_color_ics">@color/highlight_color_ics</color>
<!-- Color resources for setup wizard and tutorial -->
<color name="setup_background">#FFEBEBEB</color>
<color name="setup_text_dark">#FF707070</color>

View File

@ -382,13 +382,10 @@
>
<item name="android:background">@drawable/keyboard_suggest_strip_holo</item>
<item name="suggestionStripOption">autoCorrectBold|validTypedWordBold</item>
<item name="colorValidTypedWord">@color/highlight_color_ics</item>
<item name="colorTypedWord">@color/highlight_color_ics</item>
<item name="colorValidTypedWord">@color/typed_word_color_ics</item>
<item name="colorTypedWord">@color/typed_word_color_ics</item>
<item name="colorAutoCorrect">@color/highlight_color_ics</item>
<item name="colorSuggested">@color/highlight_color_ics</item>
<item name="alphaValidTypedWord">85%</item>
<item name="alphaTypedWord">85%</item>
<item name="alphaSuggested">70%</item>
<item name="colorSuggested">@color/suggested_word_color_ics</item>
<item name="alphaObsoleted">70%</item>
<item name="suggestionsCountInStrip">@integer/suggestions_count_in_strip</item>
<item name="centerSuggestionPercentile">@fraction/center_suggestion_percentile</item>

View File

@ -125,24 +125,12 @@ final class SuggestionStripLayoutHelper {
R.styleable.SuggestionStripView, defStyle, R.style.SuggestionStripViewStyle);
mSuggestionStripOption = a.getInt(
R.styleable.SuggestionStripView_suggestionStripOption, 0);
final float alphaValidTypedWord = ResourceUtils.getFraction(a,
R.styleable.SuggestionStripView_alphaValidTypedWord, 1.0f);
final float alphaTypedWord = ResourceUtils.getFraction(a,
R.styleable.SuggestionStripView_alphaTypedWord, 1.0f);
final float alphaAutoCorrect = ResourceUtils.getFraction(a,
R.styleable.SuggestionStripView_alphaAutoCorrect, 1.0f);
final float alphaSuggested = ResourceUtils.getFraction(a,
R.styleable.SuggestionStripView_alphaSuggested, 1.0f);
mAlphaObsoleted = ResourceUtils.getFraction(a,
R.styleable.SuggestionStripView_alphaSuggested, 1.0f);
mColorValidTypedWord = applyAlpha(a.getColor(
R.styleable.SuggestionStripView_colorValidTypedWord, 0), alphaValidTypedWord);
mColorTypedWord = applyAlpha(a.getColor(
R.styleable.SuggestionStripView_colorTypedWord, 0), alphaTypedWord);
mColorAutoCorrect = applyAlpha(a.getColor(
R.styleable.SuggestionStripView_colorAutoCorrect, 0), alphaAutoCorrect);
mColorSuggested = applyAlpha(a.getColor(
R.styleable.SuggestionStripView_colorSuggested, 0), alphaSuggested);
R.styleable.SuggestionStripView_alphaObsoleted, 1.0f);
mColorValidTypedWord = a.getColor(R.styleable.SuggestionStripView_colorValidTypedWord, 0);
mColorTypedWord = a.getColor(R.styleable.SuggestionStripView_colorTypedWord, 0);
mColorAutoCorrect = a.getColor(R.styleable.SuggestionStripView_colorAutoCorrect, 0);
mColorSuggested = a.getColor(R.styleable.SuggestionStripView_colorSuggested, 0);
mSuggestionsCountInStrip = a.getInt(
R.styleable.SuggestionStripView_suggestionsCountInStrip,
DEFAULT_SUGGESTIONS_COUNT_IN_STRIP);