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

Commit 0be2720c authored by Ember Rose's avatar Ember Rose Committed by Android (Google) Code Review
Browse files

Merge "Add @InspectableProperty annotations to LayoutParams"

parents 56ff8c44 de3b4a78
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.view.ViewDebug;
import android.view.ViewGroup;
import android.view.ViewHierarchyEncoder;
import android.view.Window;
import android.view.inspector.InspectableProperty;
import android.widget.SpinnerAdapter;

import java.lang.annotation.Retention;
@@ -1374,6 +1375,9 @@ public abstract class ActionBar {
                @ViewDebug.IntToString(from = Gravity.CENTER,            to = "CENTER"),
                @ViewDebug.IntToString(from = Gravity.FILL,              to = "FILL")
        })
        @InspectableProperty(
                name = "layout_gravity",
                valueType = InspectableProperty.ValueType.GRAVITY)
        public int gravity = Gravity.NO_GRAVITY;

        public LayoutParams(@NonNull Context c, AttributeSet attrs) {
+12 −0
Original line number Diff line number Diff line
@@ -7845,6 +7845,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
            @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
        })
        @InspectableProperty(name = "layout_width", enumMapping = {
                @InspectableProperty.EnumMap(name = "match_parent", value = MATCH_PARENT),
                @InspectableProperty.EnumMap(name = "wrap_content", value = WRAP_CONTENT)
        })
        public int width;

        /**
@@ -7856,6 +7860,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            @ViewDebug.IntToString(from = MATCH_PARENT, to = "MATCH_PARENT"),
            @ViewDebug.IntToString(from = WRAP_CONTENT, to = "WRAP_CONTENT")
        })
        @InspectableProperty(name = "layout_height", enumMapping = {
                @InspectableProperty.EnumMap(name = "match_parent", value = MATCH_PARENT),
                @InspectableProperty.EnumMap(name = "wrap_content", value = WRAP_CONTENT)
        })
        public int height;

        /**
@@ -8028,6 +8036,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         * to this field.
         */
        @ViewDebug.ExportedProperty(category = "layout")
        @InspectableProperty(name = "layout_marginLeft")
        public int leftMargin;

        /**
@@ -8036,6 +8045,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         * to this field.
         */
        @ViewDebug.ExportedProperty(category = "layout")
        @InspectableProperty(name = "layout_marginTop")
        public int topMargin;

        /**
@@ -8044,6 +8054,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         * to this field.
         */
        @ViewDebug.ExportedProperty(category = "layout")
        @InspectableProperty(name = "layout_marginRight")
        public int rightMargin;

        /**
@@ -8052,6 +8063,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
         * to this field.
         */
        @ViewDebug.ExportedProperty(category = "layout")
        @InspectableProperty(name = "layout_marginBottom")
        public int bottomMargin;

        /**
+3 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.inspector.InspectableProperty;
import android.widget.RemoteViews.RemoteView;


@@ -159,10 +160,12 @@ public class AbsoluteLayout extends ViewGroup {
        /**
         * The horizontal, or X, location of the child within the view group.
         */
        @InspectableProperty(name = "layout_x")
        public int x;
        /**
         * The vertical, or Y, location of the child within the view group.
         */
        @InspectableProperty(name = "layout_y")
        public int y;

        /**
+3 −0
Original line number Diff line number Diff line
@@ -443,6 +443,9 @@ public class FrameLayout extends ViewGroup {
         * @see android.view.Gravity
         * @attr ref android.R.styleable#FrameLayout_Layout_layout_gravity
         */
        @InspectableProperty(
                name = "layout_gravity",
                valueType = InspectableProperty.ValueType.GRAVITY)
        public int gravity = UNSPECIFIED_GRAVITY;

        public LayoutParams(@NonNull Context c, @Nullable AttributeSet attrs) {
+4 −0
Original line number Diff line number Diff line
@@ -1987,6 +1987,7 @@ public class LinearLayout extends ViewGroup {
         * will be pro-rated among all views whose weight is greater than 0.
         */
        @ViewDebug.ExportedProperty(category = "layout")
        @InspectableProperty(name = "layout_weight")
        public float weight;

        /**
@@ -2010,6 +2011,9 @@ public class LinearLayout extends ViewGroup {
            @ViewDebug.IntToString(from = Gravity.CENTER,            to = "CENTER"),
            @ViewDebug.IntToString(from = Gravity.FILL,              to = "FILL")
        })
        @InspectableProperty(
                name = "layout_gravity",
                valueType = InspectableProperty.ValueType.GRAVITY)
        public int gravity = -1;

        /**
Loading