aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-07-04 00:10:39 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-04 00:10:39 -0700
commit7d3821c2b303a3f82015c482f93fbbfc777f8222 (patch)
tree5527b8cd026310f33c002e463a98d31cf26ce26c /java/src
parent9812fb0fe99cfb8f288b3ed553a805521ce24c10 (diff)
parente583371b13ebd9aa336d0883e8c174ae4918c758 (diff)
downloadlatinime-7d3821c2b303a3f82015c482f93fbbfc777f8222.tar.gz
latinime-7d3821c2b303a3f82015c482f93fbbfc777f8222.tar.xz
latinime-7d3821c2b303a3f82015c482f93fbbfc777f8222.zip
Merge "Use Key background for suggestions strip control"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/CandidateView.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/CandidateView.java b/java/src/com/android/inputmethod/latin/CandidateView.java
index 1ab7c6d42..7ec18b38a 100644
--- a/java/src/com/android/inputmethod/latin/CandidateView.java
+++ b/java/src/com/android/inputmethod/latin/CandidateView.java
@@ -21,6 +21,7 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
import android.os.Message;
import android.text.Spannable;
import android.text.SpannableString;
@@ -330,9 +331,18 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
mInvertedForegroundColorSpan = new ForegroundColorSpan(mColorTypedWord ^ 0x00ffffff);
mInvertedBackgroundColorSpan = new BackgroundColorSpan(mColorTypedWord);
+ final TypedArray keyboardViewAttr = context.obtainStyledAttributes(
+ attrs, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView);
+ final Drawable keyBackground = keyboardViewAttr.getDrawable(
+ R.styleable.KeyboardView_keyBackground);
+ final int keyTextColor = keyboardViewAttr.getColor(
+ R.styleable.KeyboardView_keyTextColor, 0xFF000000);
+ keyboardViewAttr.recycle();
+
mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control);
mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane);
- mExpandCandidatesPane.getBackground().setAlpha(180);
+ mExpandCandidatesPane.setBackgroundDrawable(keyBackground);
+ mExpandCandidatesPane.setTextColor(keyTextColor);
mExpandCandidatesPane.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
@@ -340,7 +350,8 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
}
});
mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane);
- mCloseCandidatesPane.getBackground().setAlpha(180);
+ mCloseCandidatesPane.setBackgroundDrawable(keyBackground);
+ mCloseCandidatesPane.setTextColor(keyTextColor);
mCloseCandidatesPane.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {