Example usage for Java android.widget FrameLayout fields, constructors, methods, implement or subclass
The text is from its open source code.
void | addView(View child) Adds a child view. |
void | addView(View child, int index) Adds a child view. |
void | addView(View child, int width, int height) Adds a child view with this ViewGroup's default layout parameters and the specified width and height. |
ViewPropertyAnimator | animate() This method returns a ViewPropertyAnimator object, which can be used to animate specific properties on this View. |
T | findViewById(@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. |
T | findViewWithTag(Object tag) Look for a child view with the given tag. |
void | forceLayout() Forces this view to be laid out during the next layout pass. |
Drawable | getBackground() Gets the background drawable |
int | getBottom() Bottom position of this view relative to its parent. |
View | getChildAt(int index) Returns the view at the specified position in the group. |
int | getChildCount() Returns the number of children in the group. |
Context | getContext() Returns the context the view is running in, through which it can access the current theme, resources, etc. |
View | getFocusedChild() Returns the focused child of this view, if any. |
Drawable | getForeground() Returns the drawable used as the foreground of this View. |
int | getHeight() Return the height of your view. |
int | getId() Returns this view's identifier. |
ViewGroup.LayoutParams | getLayoutParams() Get the LayoutParams associated with this view. |
int | getLeft() Left position of this view relative to its parent. |
int | getMeasuredHeight() Like #getMeasuredHeightAndState() , but only returns the raw height component (that is the result is masked by #MEASURED_SIZE_MASK ). |
int | getMeasuredWidth() Like #getMeasuredWidthAndState() , but only returns the raw width component (that is the result is masked by #MEASURED_SIZE_MASK ). |
int | getPaddingBottom() Returns the bottom padding of this view. |
int | getPaddingLeft() Returns the left padding of this view. |
int | getPaddingRight() Returns the right padding of this view. |
int | getPaddingTop() Returns the top padding of this view. |
ViewParent | getParent() Gets the parent of this view. |
int | getRight() Right position of this view relative to its parent. |
int | getSystemUiVisibility() Returns the last #setSystemUiVisibility(int) that this view has requested. |
Object | getTag() Returns this view's tag. |
int | getTop() Top position of this view relative to its parent. |
ViewTreeObserver | getViewTreeObserver() Returns the ViewTreeObserver for this view's hierarchy. |
int | getVisibility() Returns the visibility status for this view. |
int | getWidth() Return the width of your view. |
WindowInsets | onApplyWindowInsets(WindowInsets insets) Called when the view should apply WindowInsets according to its internal policy. |
void | removeAllViews() Call this method to remove all child views from the ViewGroup. |
void | removeView(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. |
void | removeViewAt(int index) Removes the view at the specified position in the group. |
void | requestLayout() Call this when something has changed which has invalidated the layout of this view. |
void | requestTransparentRegion(View child) |
void | setAnimation(Animation animation) Sets the next animation to play for this view. |
void | setBackground(Drawable background) Set the background to a given Drawable, or remove the background. |
void | setBackgroundColor(@ColorInt int color) Sets the background color for this view. |
void | setBackgroundDrawable(Drawable background) |
void | setBackgroundResource(@DrawableRes int resid) Set the background to a given resource. |
void | setClickable(boolean clickable) Enables or disables click events for this view. |
void | setClipChildren(boolean clipChildren) By default, children are clipped to their bounds before drawing. |
void | setClipToPadding(boolean clipToPadding) Sets whether this ViewGroup will clip its children to its padding and resize (but not clip) any EdgeEffect to the padded region, if padding is present. |
void | setDrawingCacheBackgroundColor(@ColorInt int color) Setting a solid background color for the drawing cache's bitmaps will improve performance and memory usage. |
void | setElevation(float elevation) Sets the base elevation of this view, in pixels. |
void | setEnabled(boolean enabled) Set the enabled state of this view. |
void | setFocusable(boolean focusable) Set whether this view can receive the focus. |
void | setFocusableInTouchMode(boolean focusableInTouchMode) Set whether this view can receive focus while in touch mode. |
void | setForeground(Drawable foreground) Supply a Drawable that is to be rendered on top of all of the content in the view. |
void | setId(@IdRes int id) Sets the identifier for this view. |
void | setKeepScreenOn(boolean keepScreenOn) Controls whether the screen should remain on, modifying the value of #KEEP_SCREEN_ON . |
void | setLayoutParams(ViewGroup.LayoutParams params) Set the layout parameters associated with this view. |
void | setLongClickable(boolean longClickable) Enables or disables long click events for this view. |
void | setMinimumHeight(int minHeight) Sets the minimum height of the view. |
void | setMinimumWidth(int minWidth) Sets the minimum width of the view. |
void | setOnApplyWindowInsetsListener(OnApplyWindowInsetsListener listener) Set an OnApplyWindowInsetsListener to take over the policy for applying window insets to this view. |
void | setOnClickListener(@Nullable OnClickListener l) Register a callback to be invoked when this view is clicked. |
void | setOnGenericMotionListener(OnGenericMotionListener l) Register a callback to be invoked when a generic motion event is sent to this view. |
void | setOnHoverListener(OnHoverListener l) Register a callback to be invoked when a hover event is sent to this view. |
void | setOnKeyListener(OnKeyListener l) Register a callback to be invoked when a hardware key is pressed in this view. |
void | setOnLongClickListener(@Nullable OnLongClickListener l) Register a callback to be invoked when this view is clicked and held. |
void | setOnTouchListener(OnTouchListener l) Register a callback to be invoked when a touch event is sent to this view. |
void | setPadding(int left, int top, int right, int bottom) Sets the padding. |
void | setSystemUiVisibility(int visibility) Request that the visibility of the status bar or other screen/window decorations be changed. |
void | setTag(final Object tag) Sets the tag associated with this view. |
void | setTranslationX(float translationX) Sets the horizontal location of this view relative to its #getLeft() left position. |
void | setTranslationY(float translationY) Sets the vertical location of this view relative to its #getTop() top position. |
void | setVisibility(@Visibility int visibility) Set the visibility state of this view. |
void | setX(float x) Sets the visual x position of this view, in pixels. |
void | setY(float y) Sets the visual y position of this view, in pixels. |
void | startAnimation(Animation animation) Start the specified animation now. |