to top
Android APIs
Added in API level 1
public interface

ViewManager

android.view.ViewManager
Known Indirect Subclasses

Class Overview

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

? Examples
abstract void addView( View view, ViewGroup.LayoutParams params)
Assign the passed LayoutParams to the passed View and add the view to the window.

? Examples
abstract void removeView( View view)

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

Public Methods

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

Added in API level 1

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 The view to be added to this window.
params The LayoutParams to assign to view.

public abstract void removeView (View view)

Added in API level 1

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

Added in API level 1

No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.