Skip to content
Snippets Groups Projects
Commit c810b0d6 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Make sure that each view has its own dedicated background drawable"

parents b9a21448 7c57e3bd
No related branches found
No related tags found
No related merge requests found
...@@ -333,7 +333,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo ...@@ -333,7 +333,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
final TypedArray keyboardViewAttr = context.obtainStyledAttributes( final TypedArray keyboardViewAttr = context.obtainStyledAttributes(
attrs, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView); attrs, R.styleable.KeyboardView, R.attr.keyboardViewStyle, R.style.KeyboardView);
final Drawable keyBackground = keyboardViewAttr.getDrawable( final Drawable expandBackground = keyboardViewAttr.getDrawable(
R.styleable.KeyboardView_keyBackground);
final Drawable closeBackground = keyboardViewAttr.getDrawable(
R.styleable.KeyboardView_keyBackground); R.styleable.KeyboardView_keyBackground);
final int keyTextColor = keyboardViewAttr.getColor( final int keyTextColor = keyboardViewAttr.getColor(
R.styleable.KeyboardView_keyTextColor, 0xFF000000); R.styleable.KeyboardView_keyTextColor, 0xFF000000);
...@@ -341,7 +343,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo ...@@ -341,7 +343,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control); mCandidatesPaneControl = (ViewGroup)findViewById(R.id.candidates_pane_control);
mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane); mExpandCandidatesPane = (TextView)findViewById(R.id.expand_candidates_pane);
mExpandCandidatesPane.setBackgroundDrawable(keyBackground); mExpandCandidatesPane.setBackgroundDrawable(expandBackground);
mExpandCandidatesPane.setTextColor(keyTextColor); mExpandCandidatesPane.setTextColor(keyTextColor);
mExpandCandidatesPane.setOnClickListener(new OnClickListener() { mExpandCandidatesPane.setOnClickListener(new OnClickListener() {
@Override @Override
...@@ -350,7 +352,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo ...@@ -350,7 +352,7 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
} }
}); });
mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane); mCloseCandidatesPane = (TextView)findViewById(R.id.close_candidates_pane);
mCloseCandidatesPane.setBackgroundDrawable(keyBackground); mCloseCandidatesPane.setBackgroundDrawable(closeBackground);
mCloseCandidatesPane.setTextColor(keyTextColor); mCloseCandidatesPane.setTextColor(keyTextColor);
mCloseCandidatesPane.setOnClickListener(new OnClickListener() { mCloseCandidatesPane.setOnClickListener(new OnClickListener() {
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment