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

Commit 93e095b7 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Add copy constructors for all widget-specific LayoutParams"

parents 6e4cc12a 0a0e155c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -30547,6 +30547,7 @@ package android.widget {
    ctor public FrameLayout.LayoutParams(int, int, int);
    ctor public FrameLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public FrameLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public FrameLayout.LayoutParams(android.widget.FrameLayout.LayoutParams);
    field public int gravity;
  }
@@ -30811,6 +30812,7 @@ package android.widget {
    ctor public LinearLayout.LayoutParams(int, int, float);
    ctor public LinearLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public LinearLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams);
    method public java.lang.String debug(java.lang.String);
    field public int gravity;
    field public float weight;
@@ -31243,6 +31245,7 @@ package android.widget {
    ctor public RelativeLayout.LayoutParams(int, int);
    ctor public RelativeLayout.LayoutParams(android.view.ViewGroup.LayoutParams);
    ctor public RelativeLayout.LayoutParams(android.view.ViewGroup.MarginLayoutParams);
    ctor public RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams);
    method public void addRule(int);
    method public void addRule(int, int);
    method public java.lang.String debug(java.lang.String);
+12 −0
Original line number Diff line number Diff line
@@ -656,5 +656,17 @@ public class FrameLayout extends ViewGroup {
        public LayoutParams(ViewGroup.MarginLayoutParams source) {
            super(source);
        }

        /**
         * Copy constructor. Clones the width, height, margin values, and
         * gravity of the source.
         *
         * @param source The layout params to copy from.
         */
        public LayoutParams(LayoutParams source) {
            super(source);

            this.gravity = source.gravity;
        }
    }
}
+9 −5
Original line number Diff line number Diff line
@@ -1961,12 +1961,16 @@ public class GridLayout extends ViewGroup {
        }

        /**
         * {@inheritDoc}
         * Copy constructor. Clones the width, height, margin values, row spec,
         * and column spec of the source.
         *
         * @param source The layout params to copy from.
         */
        public LayoutParams(LayoutParams that) {
            super(that);
            this.rowSpec = that.rowSpec;
            this.columnSpec = that.columnSpec;
        public LayoutParams(LayoutParams source) {
            super(source);

            this.rowSpec = source.rowSpec;
            this.columnSpec = source.columnSpec;
        }

        // AttributeSet constructors
+14 −1
Original line number Diff line number Diff line
@@ -1871,10 +1871,23 @@ public class LinearLayout extends ViewGroup {
        /**
         * {@inheritDoc}
         */
        public LayoutParams(MarginLayoutParams source) {
        public LayoutParams(ViewGroup.MarginLayoutParams source) {
            super(source);
        }

        /**
         * Copy constructor. Clones the width, height, margin values, weight,
         * and gravity of the source.
         *
         * @param source The layout params to copy from.
         */
        public LayoutParams(LayoutParams source) {
            super(source);

            this.weight = source.weight;
            this.gravity = source.gravity;
        }

        @Override
        public String debug(String output) {
            return output + "LinearLayout.LayoutParams={width=" + sizeToString(width) +
+18 −0
Original line number Diff line number Diff line
@@ -1321,6 +1321,24 @@ public class RelativeLayout extends ViewGroup {
            super(source);
        }

        /**
         * Copy constructor. Clones the width, height, margin values, and rules
         * of the source.
         *
         * @param source The layout params to copy from.
         */
        public LayoutParams(LayoutParams source) {
            super(source);

            this.mIsRtlCompatibilityMode = source.mIsRtlCompatibilityMode;
            this.mRulesChanged = source.mRulesChanged;
            this.alignWithParent = source.alignWithParent;

            System.arraycopy(source.mRules, LEFT_OF, this.mRules, LEFT_OF, VERB_COUNT);
            System.arraycopy(
                    source.mInitialRules, LEFT_OF, this.mInitialRules, LEFT_OF, VERB_COUNT);
        }

        @Override
        public String debug(String output) {
            return output + "ViewGroup.LayoutParams={ width=" + sizeToString(width) +