// Temp is the root view that was found in the xml final View temp = createViewFromTag(root, name, attrs, false); ViewGroup.LayoutParams params = null; if (root != null) { if (DEBUG) { System.out.println("Creating params from root: " + root); }
1.理清概念 我们使用过Dialog和PopupWindow,还有Toast,它们都显示在Activity之上.那么我们首先需要理解的是android中是如何去绘制这些UI的呢?这里我只讲我所理解的,首先看一层次图(盗用网络) 首先我们看到左边的Activity层,我们使用到的Activity,其中会有一个PhoneWindow,这个每一个Activity都包含的,并且PhoneActivity去管理一个DecoView根视图,并且这也解释了我们使用的setContentView(int r
App WidgetsApp Widgets are miniature application views that can be embedded in other applications (such as the Home screen) and receive periodic updates. These views are referred to as Widgets in the user interface, and you can publish one with an Ap