Skip to content

Commit 7e400cf

Browse files
Winson ChungAndroid (Google) Code Review
authored andcommitted
Merge "Adding getters/setters for StackView xml attrs. (Bug 6104219)" into jb-dev
2 parents 94affdd + 7ced8f9 commit 7e400cf

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

api/current.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28247,6 +28247,10 @@ package android.widget {
2824728247
ctor public StackView(android.content.Context);
2824828248
ctor public StackView(android.content.Context, android.util.AttributeSet);
2824928249
ctor public StackView(android.content.Context, android.util.AttributeSet, int);
28250+
method public int getClickColor();
28251+
method public int getOutlineColor();
28252+
method public void setClickColor(int);
28253+
method public void setOutlineColor(int);
2825028254
}
2825128255

2825228256
public class Switch extends android.widget.CompoundButton {

core/java/android/widget/StackView.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,46 @@ private void initStackView() {
219219
mFramePadding = (int) Math.ceil(density * FRAME_PADDING);
220220
}
221221

222+
/**
223+
* Sets the color of the outlines of items in this StackView.
224+
*
225+
* @param color the color of the StackView item outlines.
226+
* @attr ref android.R.styleable#StackView_resOutColor
227+
*/
228+
@android.view.RemotableViewMethod
229+
public void setOutlineColor(int color) {
230+
mResOutColor = color;
231+
}
232+
233+
/**
234+
* Returns the color of the outlines of items in this StackView.
235+
*
236+
* @attr ref android.R.styleable#StackView_resOutColor
237+
*/
238+
public int getOutlineColor() {
239+
return mResOutColor;
240+
}
241+
242+
/**
243+
* Sets the color for the click feedback on items in this StackView.
244+
*
245+
* @param color the color of the StackView item click feedback.
246+
* @attr ref android.R.styleable#StackView_clickColor
247+
*/
248+
@android.view.RemotableViewMethod
249+
public void setClickColor(int color) {
250+
mClickColor = color;
251+
}
252+
253+
/**
254+
* Returns the color of the click feedback on items in this StackView.
255+
*
256+
* @attr ref android.R.styleable#StackView_clickColor
257+
*/
258+
public int getClickColor() {
259+
return mClickColor;
260+
}
261+
222262
/**
223263
* Animate the views between different relative indexes within the {@link AdapterViewAnimator}
224264
*/

0 commit comments

Comments
 (0)