LinearLayout

Class of android.widget · LinearLayout.java · Android's reference

public class LinearLayout extends ViewGroup

LinearLayout ← ViewGroup ← View

Children in one row or one column. A child with a weight gets that share of the space that remains.

Nested types

Extended in the framework by

Members

public static final int HORIZONTAL = 0 source
public static final int VERTICAL = 1 source
public static final int SHOW_DIVIDER_NONE = 0 source
public static final int SHOW_DIVIDER_BEGINNING = 1 source
public static final int SHOW_DIVIDER_MIDDLE = 2 source
public static final int SHOW_DIVIDER_END = 4 source
public LinearLayout(Context context) source
public LinearLayout(Context context, AttributeSet attrs) source
public LinearLayout(Context context, AttributeSet attrs, int defStyleAttr) source
public LinearLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) source
public void setOrientation(int orientation) source
public int getOrientation() source
public void setGravity(int gravity) source
public int getGravity() source
public void setHorizontalGravity(int horizontalGravity) source
public void setVerticalGravity(int verticalGravity) source
public void setWeightSum(float weightSum) source
public float getWeightSum() source
public void setBaselineAligned(boolean baselineAligned) source
public boolean isBaselineAligned() source
public void setBaselineAlignedChildIndex(int i) source
public int getBaselineAlignedChildIndex() source
public void setMeasureWithLargestChildEnabled(boolean enabled) source
public boolean isMeasureWithLargestChildEnabled() source
public void setDividerDrawable(Drawable divider) source
public Drawable getDividerDrawable() source
public void setShowDividers(int showDividers) source
public int getShowDividers() source
public void setDividerPadding(int padding) source
public int getDividerPadding() source
protected void onFinishInflate() empty body source
protected LayoutParams generateDefaultLayoutParams() source
public LayoutParams generateLayoutParams(AttributeSet attrs) source
protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) source
protected boolean checkLayoutParams(ViewGroup.LayoutParams p) source

Measure, along the main axis (the orientation) and the cross axis

protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) source
protected void onLayout(boolean changed, int l, int t, int r, int b) source
public boolean shouldDelayChildPressedState() source
public CharSequence getAccessibilityClassName() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.