summaryrefslogtreecommitdiffstats
path: root/core/java/android/view
diff options
context:
space:
mode:
authorFilip GruszczyƄski <gruszczy@google.com>2014-03-05 14:43:49 -0800
committerFilip GruszczyƄski <gruszczy@google.com>2014-03-05 14:43:49 -0800
commitc16ba8cda7f16970debba9df9bbc168a9c7c1797 (patch)
tree5e24206cd518e1a912ab3316f6817301bf523aae /core/java/android/view
parentb971b89c78db541a8e924370d064e6d777e88095 (diff)
downloadframeworks_base-c16ba8cda7f16970debba9df9bbc168a9c7c1797.zip
frameworks_base-c16ba8cda7f16970debba9df9bbc168a9c7c1797.tar.gz
frameworks_base-c16ba8cda7f16970debba9df9bbc168a9c7c1797.tar.bz2
Passing and using defStyle in ViewGroup initFromAttributes.
Change-Id: I2104037d6f701aa3a27bf09226aca171ec77495d
Diffstat (limited to 'core/java/android/view')
-rw-r--r--core/java/android/view/ViewGroup.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 9414237..5763e72 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -463,13 +463,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
public ViewGroup(Context context, AttributeSet attrs) {
super(context, attrs);
initViewGroup();
- initFromAttributes(context, attrs);
+ initFromAttributes(context, attrs, 0);
}
public ViewGroup(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initViewGroup();
- initFromAttributes(context, attrs);
+ initFromAttributes(context, attrs, defStyle);
}
private boolean debugDraw() {
@@ -499,9 +499,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
mPersistentDrawingCache = PERSISTENT_SCROLLING_CACHE;
}
- private void initFromAttributes(Context context, AttributeSet attrs) {
- TypedArray a = context.obtainStyledAttributes(attrs,
- R.styleable.ViewGroup);
+ private void initFromAttributes(Context context, AttributeSet attrs, int defStyle) {
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ViewGroup, defStyle, 0);
final int N = a.getIndexCount();
for (int i = 0; i < N; i++) {