diff --git a/java/res/layout/suggestion_info.xml b/java/res/layout/suggestion_info.xml deleted file mode 100644 index 0aa26000d..000000000 --- a/java/res/layout/suggestion_info.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - diff --git a/java/res/layout/suggestion_word.xml b/java/res/layout/suggestion_word.xml deleted file mode 100644 index 47d2bd864..000000000 --- a/java/res/layout/suggestion_word.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/java/res/layout/suggestions_strip.xml b/java/res/layout/suggestions_strip.xml index 85d60e681..d8a65f6e5 100644 --- a/java/res/layout/suggestions_strip.xml +++ b/java/res/layout/suggestions_strip.xml @@ -31,13 +31,17 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="invisible"> - + - + diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml index 7c9b51c0a..3bfd73a55 100644 --- a/java/res/values/themes-common.xml +++ b/java/res/values/themes-common.xml @@ -127,7 +127,22 @@ @integer/config_max_more_suggestions_row @fraction/config_min_more_suggestions_width - - diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml index 125b640b6..caea92186 100644 --- a/java/res/values/themes-ics.xml +++ b/java/res/values/themes-ics.xml @@ -119,7 +119,11 @@ @color/suggested_word_color_ics 70% - diff --git a/java/res/values/themes-klp.xml b/java/res/values/themes-klp.xml index f6c076767..0599fb65e 100644 --- a/java/res/values/themes-klp.xml +++ b/java/res/values/themes-klp.xml @@ -119,7 +119,11 @@ @color/suggested_word_color_klp 70% - diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 0ebf5cba5..5469ced7a 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -18,8 +18,10 @@ package com.android.inputmethod.latin.suggestions; import android.content.Context; import android.content.res.Resources; +import android.graphics.Color; import android.support.v4.view.ViewCompat; import android.util.AttributeSet; +import android.util.TypedValue; import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; @@ -56,6 +58,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick } static final boolean DBG = LatinImeLogger.sDBG; + private static final float DEBUG_INFO_TEXT_SIZE_IN_DIP = 6.0f; private final ViewGroup mSuggestionsStrip; private final ViewGroup mAddToDictionaryStrip; @@ -128,14 +131,17 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick mStripVisibilityGroup = new StripVisibilityGroup(mSuggestionsStrip, mAddToDictionaryStrip); for (int pos = 0; pos < SuggestedWords.MAX_SUGGESTIONS; pos++) { - final TextView word = (TextView)inflater.inflate(R.layout.suggestion_word, null); + final TextView word = new TextView(context, null, R.attr.suggestionWordStyle); word.setOnClickListener(this); word.setOnLongClickListener(this); mWordViews.add(word); final View divider = inflater.inflate(R.layout.suggestion_divider, null); divider.setOnClickListener(this); mDividerViews.add(divider); - mDebugInfoViews.add((TextView)inflater.inflate(R.layout.suggestion_info, null)); + final TextView info = new TextView(context, null, R.attr.suggestionWordStyle); + info.setTextColor(Color.WHITE); + info.setTextSize(TypedValue.COMPLEX_UNIT_DIP, DEBUG_INFO_TEXT_SIZE_IN_DIP); + mDebugInfoViews.add(info); } mLayoutHelper = new SuggestionStripLayoutHelper(