Android Guides | Samples

Android.Widget.FrameLayout Class

FrameLayout is designed to block out an area on the screen to display a single item.

See Also: FrameLayout

Syntax

[Android.Runtime.Register("android/widget/FrameLayout", DoNotGenerateAcw=true)]
public class FrameLayout : ViewGroup

Remarks

FrameLayout is designed to block out an area on the screen to display a single item. Generally, FrameLayout should be used to hold a single child view, because it can be difficult to organize child views in a way that's scalable to different screen sizes without the children overlapping each other. You can, however, add multiple children to a FrameLayout and control their position within the FrameLayout by assigning gravity to each child, using the attribute.

Child views are drawn in a stack, with the most recently added child on top. The size of the FrameLayout is the size of its largest child (plus padding), visible or not (if the FrameLayout's parent permits). Views that are ViewStates.Gone are used for sizing only if FrameLayout.SetMeasureAllChildren(Boolean) is set to true.

[Android Documentation]

Requirements

Namespace: Android.Widget
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.Widget.FrameLayout are listed below.

See Also: ViewGroup

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Properties

[read-only]
ConsiderGoneChildrenWhenMeasuringBoolean. Determines whether all children, or just those in the VISIBLE or INVISIBLE state, are considered when measuring.
ForegroundDrawable. Returns the drawable used as the foreground of this FrameLayout.
[read-only]
ForegroundGravityGravityFlags. Describes how the foreground is positioned.
ForegroundTintListColorStateList.
ForegroundTintModePorterDuff+Mode.
MeasureAllChildrenBoolean. Determines whether all children, or just those in the VISIBLE or INVISIBLE state, are considered when measuring.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

SetForegroundGravity(GravityFlags)
Describes how the foreground is positioned.
SetMeasureAllChildren(Boolean)
Sets whether to consider all children, or just those in the VISIBLE or INVISIBLE state, when measuring.

Protected Methods

override
OnLayout(Boolean, Int32, Int32, Int32, Int32)
Called from layout when this view should assign a size and position to each of its children.