DJI Mobile SDK Documentation

      class WidgetLayoutParam

      class WidgetLayoutParam implements Parcelable 
      Package:dji.open.pilot.base.ui.model
      Description:

      Widget layout parameters (used for layout configuration of child views within a parent container).

      Supported since MSDK 5.20.1

      Class Members:
      method
      method setMargin
      void setMargin(int left, int top, int right, int bottom) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the margins on all four sides.

      Supported since MSDK 5.20.1

      Input Parameters:
      int leftLeft margin (dp).
      int topTop margin (dp).
      int rightRight margin (dp).
      int bottomBottom margin (dp).
      method setMarginLeft
      void setMarginLeft(int margin) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the left margin.

      Supported since MSDK 5.20.1

      Input Parameters:
      int marginLeft margin (dp).
      method setMarginTop
      void setMarginTop(int margin) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the top margin.

      Supported since MSDK 5.20.1

      Input Parameters:
      int marginTop margin (dp).
      method setMarginRight
      void setMarginRight(int margin) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the right margin.

      Supported since MSDK 5.20.1

      Input Parameters:
      int marginRight margin (dp).
      method setMarginBottom
      void setMarginBottom(int margin) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the bottom margin.

      Supported since MSDK 5.20.1

      Input Parameters:
      int marginBottom margin (dp).
      method getMarginLeft
      int getMarginLeft() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the left margin.

      Supported since MSDK 5.20.1

      Return:
      intLeft margin (dp).
      method getMarginTop
      int getMarginTop() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the top margin.

      Supported since MSDK 5.20.1

      Return:
      intTop margin (dp).
      method getMarginRight
      int getMarginRight() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the right margin.

      Supported since MSDK 5.20.1

      Return:
      intRight margin (dp).
      method getMarginBottom
      int getMarginBottom() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the bottom margin.

      Supported since MSDK 5.20.1

      Return:
      intBottom margin (dp).
      method
      method setWeight
      void setWeight(float weight) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the weight (used with LinearLayout; the dimension in the corresponding direction should be set to 0).

      Supported since MSDK 5.20.1

      Input Parameters:
      float weightThe weight value.
      method
      method getWeight
      float getWeight() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the weight.

      Supported since MSDK 5.20.1

      Return:
      floatThe weight value.
      method setLayoutGravity
      void setLayoutGravity(GravityType gravity) 
      Package:dji.open.pilot.base.ui.model
      Description:

      Sets the alignment within the parent container.

      Supported since MSDK 5.20.1

      Input Parameters:
      GravityType gravityThe alignment.
      method getLayoutGravity
      GravityType getLayoutGravity() 
      Package:dji.open.pilot.base.ui.model
      Description:

      Gets the alignment within the parent container.

      Supported since MSDK 5.20.1

      Return:
      GravityTypeThe alignment.