IT. Expert System.

Android Reference

ViewGroup.MarginLayoutParams


android.view

Class ViewGroup.MarginLayoutParams

    • Field Detail

      • leftMargin

        public int leftMargin
        The left margin in pixels of the child. Call ViewGroup#setLayoutParams(LayoutParams) after reassigning a new value to this field.
      • topMargin

        public int topMargin
        The top margin in pixels of the child. Call ViewGroup#setLayoutParams(LayoutParams) after reassigning a new value to this field.
      • rightMargin

        public int rightMargin
        The right margin in pixels of the child. Call ViewGroup#setLayoutParams(LayoutParams) after reassigning a new value to this field.
      • bottomMargin

        public int bottomMargin
        The bottom margin in pixels of the child. Call ViewGroup#setLayoutParams(LayoutParams) after reassigning a new value to this field.
      • DEFAULT_RELATIVE

        public static final int DEFAULT_RELATIVE
        The default start and end margin.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ViewGroup.MarginLayoutParams

        public ViewGroup.MarginLayoutParams(Context c,
                                    AttributeSet attrs)
        Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.
        Parameters:
        c - the application environment
        attrs - the set of attributes from which to extract the layout parameters' values
      • ViewGroup.MarginLayoutParams

        public ViewGroup.MarginLayoutParams(int width,
                                    int height)
      • ViewGroup.MarginLayoutParams

        public ViewGroup.MarginLayoutParams(ViewGroup.MarginLayoutParams source)
        Copy constructor. Clones the width, height and margin values of the source.
        Parameters:
        source - The layout params to copy from.
    • Method Detail

      • setMargins

        public void setMargins(int left,
                      int top,
                      int right,
                      int bottom)
        Sets the margins, in pixels. A call to View.requestLayout() needs to be done so that the new margins are taken into account. Left and right margins may be overriden by View.requestLayout() depending on layout direction.
        Parameters:
        left - the left margin size
        top - the top margin size
        right - the right margin size
        bottom - the bottom margin size
      • setMarginsRelative

        public void setMarginsRelative(int start,
                              int top,
                              int end,
                              int bottom)
        Sets the relative margins, in pixels. A call to View.requestLayout() needs to be done so that the new relative margins are taken into account. Left and right margins may be overriden by View.requestLayout() depending on layout direction.
        Parameters:
        start - the start margin size
        top - the top margin size
        end - the right margin size
        bottom - the bottom margin size
      • setMarginStart

        public void setMarginStart(int start)
        Sets the relative start margin.
        Parameters:
        start - the start margin size
      • getMarginStart

        public int getMarginStart()
        Returns the start margin in pixels.
        Returns:
        the start margin in pixels.
      • setMarginEnd

        public void setMarginEnd(int end)
        Sets the relative end margin.
        Parameters:
        end - the end margin size
      • getMarginEnd

        public int getMarginEnd()
        Returns the end margin in pixels.
        Returns:
        the end margin in pixels.
      • isMarginRelative

        public boolean isMarginRelative()
        Check if margins are relative.
        Returns:
        true if either marginStart or marginEnd has been set.
      • isLayoutRtl

        public boolean isLayoutRtl()
      • onDebugDraw

        public void onDebugDraw(View view,
                       Canvas canvas)
        Description copied from class: ViewGroup.LayoutParams
        Use canvas to draw suitable debugging annotations for these LayoutParameters.
        Overrides:
        onDebugDraw in class ViewGroup.LayoutParams
        Parameters:
        view - the view that contains these layout parameters
        canvas - the canvas on which to draw


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2293 / . Delta: 0.12857 с