参考:
http://blog.sina.com.cn/s/blog_13660d79b0102xbaq.html
先看一个接口
package android.view;
/** Interface to let you add and remove child views to an Activity. To get an instance
* of this class, call {@link android.content.Context#getSystemService(java.lang.String) Context.getSystemService()}.
*/
public interface ViewManager
{
/**
* Assign the passed LayoutParams to the passed View and add the view to the window.
* <p>Throws {@link android.view.WindowManager.BadTokenException} for certain programming
* errors, such as adding a second view to a window without removing the first view.
* <p>Throws {@link android.view.WindowManager.InvalidDisplayException} if the window is on a
* secondary {@link Display} and the specified display can't be found
* (see {@link android.app.Presentation}).
* @param view The view to be added to this window.
* @param params The LayoutParams to assign to view.
*/
public void addView(View view, ViewGroup.LayoutParams params);
public void updateViewLayout(View view, ViewGroup.LayoutParams params);
public void removeView(View view);
}
简单翻译一下就是一个添加和移除activityView 的接口,
使用sourceInsight的show in relation Window功能可以看到这个接口一共只有两个实现类(第一层)

分别是ViewGroup和WindowManager
本文解析了Android中ViewManager接口的功能,它是添加和移除Activity视图的基础。文章详细介绍了addView、updateViewLayout和removeView等核心方法,并指出ViewGroup和WindowManager是该接口的主要实现者。
ViewManager&spm=1001.2101.3001.5002&articleId=90767170&d=1&t=3&u=be931266c85d46d5987d913359de8673)
855

被折叠的 条评论
为什么被折叠?



