Tweak candidate view height and etc.
Change-Id: I91963d0be122baf2274ea03b5028a66259a2cdb6main
parent
4a734aa21e
commit
89c58745d6
|
@ -19,7 +19,8 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<dimen name="key_label_text_size">18dip</dimen>
|
<dimen name="key_letter_size">28dip</dimen>
|
||||||
|
<dimen name="key_label_text_size">20dip</dimen>
|
||||||
<!-- left or right padding of label alignment -->
|
<!-- left or right padding of label alignment -->
|
||||||
<dimen name="key_label_horizontal_alignment_padding">18dip</dimen>
|
<dimen name="key_label_horizontal_alignment_padding">18dip</dimen>
|
||||||
<dimen name="candidate_strip_padding">40.0mm</dimen>
|
<dimen name="candidate_strip_padding">40.0mm</dimen>
|
||||||
|
|
|
@ -36,13 +36,13 @@
|
||||||
<!-- popup_key_height x -1.0 -->
|
<!-- popup_key_height x -1.0 -->
|
||||||
<dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen>
|
<dimen name="mini_keyboard_vertical_correction">-13.0mm</dimen>
|
||||||
|
|
||||||
<dimen name="key_letter_size">24dip</dimen>
|
<dimen name="key_letter_size">26dip</dimen>
|
||||||
<dimen name="key_label_text_size">14dip</dimen>
|
<dimen name="key_label_text_size">16dip</dimen>
|
||||||
<dimen name="key_preview_text_size_large">24dip</dimen>
|
<dimen name="key_preview_text_size_large">24dip</dimen>
|
||||||
<!-- left or right padding of label alignment -->
|
<!-- left or right padding of label alignment -->
|
||||||
<dimen name="key_label_horizontal_alignment_padding">4dip</dimen>
|
<dimen name="key_label_horizontal_alignment_padding">6dip</dimen>
|
||||||
|
|
||||||
<dimen name="candidate_strip_height">56dip</dimen>
|
<dimen name="candidate_strip_height">46dip</dimen>
|
||||||
<dimen name="candidate_strip_padding">15.0mm</dimen>
|
<dimen name="candidate_strip_padding">15.0mm</dimen>
|
||||||
<dimen name="candidate_text_size">22dip</dimen>
|
<dimen name="candidate_text_size">22dip</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -138,19 +138,20 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
|
||||||
TextView tv = (TextView)v.findViewById(R.id.candidate_word);
|
TextView tv = (TextView)v.findViewById(R.id.candidate_word);
|
||||||
tv.setTypeface(Typeface.DEFAULT);
|
tv.setTypeface(Typeface.DEFAULT);
|
||||||
tv.setTextColor(mColorNormal);
|
tv.setTextColor(mColorNormal);
|
||||||
if (mConfigCandidateHighlightFontColorEnabled) {
|
if (haveMinimalSuggestion
|
||||||
if (haveMinimalSuggestion
|
&& ((i == 1 && !typedWordValid) || (i == 0 && typedWordValid))) {
|
||||||
&& ((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 {
|
|
||||||
// TODO: Display underline for the auto-correction word
|
// 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.setText(suggestion);
|
||||||
tv.setClickable(true);
|
tv.setClickable(true);
|
||||||
|
|
Loading…
Reference in New Issue