Java android.widget TableLayout fields, constructors, methods, implement or subclass

Example usage for Java android.widget TableLayout fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.widget TableLayout.

The text is from its open source code.

Subclass

android.widget.TableLayout has subclasses.
Click this link to see all its subclasses.

Constructor

TableLayout(Context context)

Creates a new TableLayout for the given context.

Method

voidaddView(View child)
voidaddView(View child, int index)
voidaddView(View child, ViewGroup.LayoutParams params)
TfindViewById(@IdRes int id)
Finds the first descendant view with the given ID, the view itself if the ID matches #getId() , or null if the ID is invalid (< 0) or there is no matching view in the hierarchy.
ViewgetChildAt(int index)
Returns the view at the specified position in the group.
intgetChildCount()
Returns the number of children in the group.
ContextgetContext()
Returns the context the view is running in, through which it can access the current theme, resources, etc.
intgetMeasuredHeight()
Like #getMeasuredHeightAndState() , but only returns the raw height component (that is the result is masked by #MEASURED_SIZE_MASK ).
ViewParentgetParent()
Gets the parent of this view.
intgetWidth()
Return the width of your view.
intindexOfChild(View child)
Returns the position in the group of the specified child view.
booleanpost(Runnable action)

Causes the Runnable to be added to the message queue.

voidremoveAllViews()
Call this method to remove all child views from the ViewGroup.
voidremoveView(View view)

Note: do not invoke this method from #draw(android.graphics.Canvas) , #onDraw(android.graphics.Canvas) , #dispatchDraw(android.graphics.Canvas) or any related method.

voidremoveViewAt(int index)
Removes the view at the specified position in the group.
voidremoveViews(int start, int count)
Removes the specified range of views from the group.
voidsetAlpha(@FloatRange(from = 0.0, to = 1.0) float alpha)
Sets the opacity of the view to a value from 0 to 1, where 0 means the view is completely transparent and 1 means the view is completely opaque.
voidsetBackgroundColor(@ColorInt int color)
Sets the background color for this view.
voidsetColumnCollapsed(int columnIndex, boolean isCollapsed)

Collapses or restores a given column.

voidsetColumnShrinkable(int columnIndex, boolean isShrinkable)

Makes the given column shrinkable or not.

voidsetColumnStretchable(int columnIndex, boolean isStretchable)

Makes the given column stretchable or not.

voidsetLayoutParams(ViewGroup.LayoutParams params)
Set the layout parameters associated with this view.
voidsetOnClickListener(@Nullable OnClickListener l)
Register a callback to be invoked when this view is clicked.
voidsetOnLongClickListener(@Nullable OnLongClickListener l)
Register a callback to be invoked when this view is clicked and held.
voidsetPadding(int left, int top, int right, int bottom)
Sets the padding.
voidsetShrinkAllColumns(boolean shrinkAllColumns)

Convenience method to mark all columns as shrinkable.

voidsetStretchAllColumns(boolean stretchAllColumns)

Convenience method to mark all columns as stretchable.

voidsetVisibility(@Visibility int visibility)
Set the visibility state of this view.
voidstartAnimation(Animation animation)
Start the specified animation now.