Skip to content

Most visited

Recently visited

navigation
Added in API level 1

ViewManager

public interface ViewManager

android.view.ViewManager
Known Indirect Subclasses


Interface to let you add and remove child views to an Activity. To get an instance of this class, call Context.getSystemService().

Summary

Public methods

abstract void addView(View view, ViewGroup.LayoutParams params)

Assign the passed LayoutParams to the passed View and add the view to the window.

abstract void removeView(View view)
abstract void updateViewLayout(View view, ViewGroup.LayoutParams params)

Public methods

addView

Added in API level 1
void addView (View view, 
                ViewGroup.LayoutParams params)

Assign the passed LayoutParams to the passed View and add the view to the window.

Throws WindowManager.BadTokenException for certain programming errors, such as adding a second view to a window without removing the first view.

Throws WindowManager.InvalidDisplayException if the window is on a secondary Display and the specified display can't be found (see Presentation).

Parameters
view View: The view to be added to this window.
params ViewGroup.LayoutParams: The LayoutParams to assign to view.

removeView

Added in API level 1
void removeView (View view)

Parameters
view View

updateViewLayout

Added in API level 1
void updateViewLayout (View view, 
                ViewGroup.LayoutParams params)

Parameters
view View
params ViewGroup.LayoutParams
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.