现在的位置: 首页 > 综合 > 正文

WindowManager与ViewManager

2013年04月30日 ⁄ 综合 ⁄ 共 1277字 ⁄ 字号 评论关闭
public interface

WindowManager

implements ViewManager

android.view.WindowManager

Class Overview

The interface that apps use to talk to the window manager.

Use Context.getSystemService(Context.WINDOW_SERVICE) to get one of these.

类概述

这个接口用于apps和window manager的通信

调用Context.getSystemService(Context.WINDOW_SERVICE)来返回一个实例

public abstract Display getDefaultDisplay ()

Since: API Level 1

Use this method to get the default Display object.

Returns
  • default Display object

调用这个方法可以返回Display对象

public abstract void removeViewImmediate (View view)

Since: API Level 1

Special variation of removeView(View) that
immediately invokes the given view hierarchy's View.onDetachedFromWindow() methods
before returning. This is not for normal applications; using it correctly requires great care.

Parameters
view The view to be removed.

这个方法不用于一般的应用程序,调用这个方法需格外小心。

public interface

ViewManager

Class Overview

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

这个接口用来让你往Activity中添加或者移除child views。你可以通过调用Context.getSystemService().获得实现这个接口的一个实例对象。

Public Methods

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

Since: API Level 1

public abstract void removeView (View view)

Since: API Level 1

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

抱歉!评论已关闭.