From 89c58745d639a4434dfbe600c28dad1bc8bc6888 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 8 Dec 2010 20:05:34 +0900 Subject: [PATCH] Tweak candidate view height and etc. Change-Id: I91963d0be122baf2274ea03b5028a66259a2cdb6 --- java/res/values-xlarge-land/dimens.xml | 3 ++- java/res/values-xlarge/dimens.xml | 8 +++--- .../inputmethod/latin/CandidateView.java | 25 ++++++++++--------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/java/res/values-xlarge-land/dimens.xml b/java/res/values-xlarge-land/dimens.xml index e1a53f9dc..5b9d50abc 100644 --- a/java/res/values-xlarge-land/dimens.xml +++ b/java/res/values-xlarge-land/dimens.xml @@ -19,7 +19,8 @@ --> - 18dip + 28dip + 20dip 18dip 40.0mm diff --git a/java/res/values-xlarge/dimens.xml b/java/res/values-xlarge/dimens.xml index 58d7d3237..dbdfa9631 100644 --- a/java/res/values-xlarge/dimens.xml +++ b/java/res/values-xlarge/dimens.xml @@ -36,13 +36,13 @@ -13.0mm - 24dip - 14dip + 26dip + 16dip 24dip - 4dip + 6dip - 56dip + 46dip 15.0mm 22dip diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java index 460ef8650..3196fa65d 100644 --- a/java/src/com/android/inputmethod/latin/CandidateView.java +++ b/java/src/com/android/inputmethod/latin/CandidateView.java @@ -138,19 +138,20 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo TextView tv = (TextView)v.findViewById(R.id.candidate_word); tv.setTypeface(Typeface.DEFAULT); tv.setTextColor(mColorNormal); - if (mConfigCandidateHighlightFontColorEnabled) { - if (haveMinimalSuggestion - && ((i == 1 && !typedWordValid) || (i == 0 && typedWordValid))) { - tv.setTypeface(Typeface.DEFAULT_BOLD); - tv.setTextColor(mColorRecommended); - existsAutoCompletion = true; - } else if (i != 0 || (wordLength == 1 && count > 1)) { - // HACK: even if i == 0, we use mColorOther when this suggestion's length is 1 - // and there are multiple suggestions, such as the default punctuation list. - tv.setTextColor(mColorOther); - } - } else { + if (haveMinimalSuggestion + && ((i == 1 && !typedWordValid) || (i == 0 && typedWordValid))) { // TODO: Display underline for the auto-correction word + tv.setTypeface(Typeface.DEFAULT_BOLD); + if (mConfigCandidateHighlightFontColorEnabled) + tv.setTextColor(mColorRecommended); + existsAutoCompletion = true; + } else if (i != 0 || (wordLength == 1 && count > 1)) { + // HACK: even if i == 0, we use mColorOther when this + // suggestion's length is 1 + // and there are multiple suggestions, such as the default + // punctuation list. + if (mConfigCandidateHighlightFontColorEnabled) + tv.setTextColor(mColorOther); } tv.setText(suggestion); tv.setClickable(true);