Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec0cfcba authored by Aurimas Liutikas's avatar Aurimas Liutikas Committed by Android (Google) Code Review
Browse files

Merge "Update core widgets to save attribute source info."

parents 5d56e664 ab324cfb
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -703,7 +703,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager


    private void initFromAttributes(
    private void initFromAttributes(
            Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
            Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ViewGroup, defStyleAttr,
        final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ViewGroup,
                defStyleAttr, defStyleRes);
        saveAttributeDataForStyleable(context, R.styleable.ViewGroup, attrs, a, defStyleAttr,
                defStyleRes);
                defStyleRes);


        final int N = a.getIndexCount();
        final int N = a.getIndexCount();
+3 −0
Original line number Original line Diff line number Diff line
@@ -108,6 +108,9 @@ public final class ViewStub extends View {


        final TypedArray a = context.obtainStyledAttributes(attrs,
        final TypedArray a = context.obtainStyledAttributes(attrs,
                R.styleable.ViewStub, defStyleAttr, defStyleRes);
                R.styleable.ViewStub, defStyleAttr, defStyleRes);
        saveAttributeDataForStyleable(context, R.styleable.ViewStub, attrs, a, defStyleAttr,
                defStyleRes);

        mInflatedId = a.getResourceId(R.styleable.ViewStub_inflatedId, NO_ID);
        mInflatedId = a.getResourceId(R.styleable.ViewStub_inflatedId, NO_ID);
        mLayoutResource = a.getResourceId(R.styleable.ViewStub_layout, 0);
        mLayoutResource = a.getResourceId(R.styleable.ViewStub_layout, 0);
        mID = a.getResourceId(R.styleable.ViewStub_id, NO_ID);
        mID = a.getResourceId(R.styleable.ViewStub_id, NO_ID);
+2 −0
Original line number Original line Diff line number Diff line
@@ -875,6 +875,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te


        final TypedArray a = context.obtainStyledAttributes(
        final TypedArray a = context.obtainStyledAttributes(
                attrs, R.styleable.AbsListView, defStyleAttr, defStyleRes);
                attrs, R.styleable.AbsListView, defStyleAttr, defStyleRes);
        saveAttributeDataForStyleable(context, R.styleable.AbsListView, attrs, a, defStyleAttr,
                defStyleRes);


        final Drawable selector = a.getDrawable(R.styleable.AbsListView_listSelector);
        final Drawable selector = a.getDrawable(R.styleable.AbsListView_listSelector);
        if (selector != null) {
        if (selector != null) {
+2 −0
Original line number Original line Diff line number Diff line
@@ -107,6 +107,8 @@ public abstract class AbsSeekBar extends ProgressBar {


        final TypedArray a = context.obtainStyledAttributes(
        final TypedArray a = context.obtainStyledAttributes(
                attrs, R.styleable.SeekBar, defStyleAttr, defStyleRes);
                attrs, R.styleable.SeekBar, defStyleAttr, defStyleRes);
        saveAttributeDataForStyleable(context, R.styleable.SeekBar, attrs, a, defStyleAttr,
                defStyleRes);


        final Drawable thumb = a.getDrawable(R.styleable.SeekBar_thumb);
        final Drawable thumb = a.getDrawable(R.styleable.SeekBar_thumb);
        setThumb(thumb);
        setThumb(thumb);
+2 −0
Original line number Original line Diff line number Diff line
@@ -82,6 +82,8 @@ public abstract class AbsSpinner extends AdapterView<SpinnerAdapter> {


        final TypedArray a = context.obtainStyledAttributes(
        final TypedArray a = context.obtainStyledAttributes(
                attrs, R.styleable.AbsSpinner, defStyleAttr, defStyleRes);
                attrs, R.styleable.AbsSpinner, defStyleAttr, defStyleRes);
        saveAttributeDataForStyleable(context, R.styleable.AbsSpinner, attrs, a, defStyleAttr,
                defStyleRes);


        final CharSequence[] entries = a.getTextArray(R.styleable.AbsSpinner_entries);
        final CharSequence[] entries = a.getTextArray(R.styleable.AbsSpinner_entries);
        if (entries != null) {
        if (entries != null) {
Loading