Skip to content

Commit 7ced8f9

Browse files
author
Winson Chung
committed
Adding getters/setters for StackView xml attrs. (Bug 6104219)
Change-Id: Iaa1ba0292b0d40f73e315028d9f01ef407021e57
1 parent 02d7e48 commit 7ced8f9

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
@@ -28243,6 +28243,10 @@ package android.widget {
2824328243
ctor public StackView(android.content.Context);
2824428244
ctor public StackView(android.content.Context, android.util.AttributeSet);
2824528245
ctor public StackView(android.content.Context, android.util.AttributeSet, int);
28246+
method public int getClickColor();
28247+
method public int getOutlineColor();
28248+
method public void setClickColor(int);
28249+
method public void setOutlineColor(int);
2824628250
}
2824728251

2824828252
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)