am 1ae480a2: Merge changes I2104037d,I125c4a00 into klp-modular-dev
* commit '1ae480a24deed18cb1ca95344995150f3a3f5c98': Passing and using defStyle in ViewGroup initFromAttributes. Set android:descendantFocusability to blocksDescendants for all NumberPicker in clockwork.
This commit is contained in:
@@ -463,13 +463,13 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
|||||||
public ViewGroup(Context context, AttributeSet attrs) {
|
public ViewGroup(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
initViewGroup();
|
initViewGroup();
|
||||||
initFromAttributes(context, attrs);
|
initFromAttributes(context, attrs, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ViewGroup(Context context, AttributeSet attrs, int defStyle) {
|
public ViewGroup(Context context, AttributeSet attrs, int defStyle) {
|
||||||
super(context, attrs, defStyle);
|
super(context, attrs, defStyle);
|
||||||
initViewGroup();
|
initViewGroup();
|
||||||
initFromAttributes(context, attrs);
|
initFromAttributes(context, attrs, defStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean debugDraw() {
|
private boolean debugDraw() {
|
||||||
@@ -499,9 +499,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
|||||||
mPersistentDrawingCache = PERSISTENT_SCROLLING_CACHE;
|
mPersistentDrawingCache = PERSISTENT_SCROLLING_CACHE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initFromAttributes(Context context, AttributeSet attrs) {
|
private void initFromAttributes(Context context, AttributeSet attrs, int defStyle) {
|
||||||
TypedArray a = context.obtainStyledAttributes(attrs,
|
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ViewGroup, defStyle, 0);
|
||||||
R.styleable.ViewGroup);
|
|
||||||
|
|
||||||
final int N = a.getIndexCount();
|
final int N = a.getIndexCount();
|
||||||
for (int i = 0; i < N; i++) {
|
for (int i = 0; i < N; i++) {
|
||||||
|
|||||||
@@ -29,5 +29,6 @@
|
|||||||
<item name="android:internalMinWidth">64dip</item>
|
<item name="android:internalMinWidth">64dip</item>
|
||||||
<item name="android:internalMaxHeight">180dip</item>
|
<item name="android:internalMaxHeight">180dip</item>
|
||||||
<item name="virtualButtonPressedDrawable">?android:attr/selectableItemBackground</item>
|
<item name="virtualButtonPressedDrawable">?android:attr/selectableItemBackground</item>
|
||||||
|
<item name="android:descendantFocusability">blocksDescendants</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user