ViewGroup类extents View implements ViewManager ViewParent
addView();
已知子类
AbsoluteLayout, AdapterView<T extends Adapter>, DrawerLayout, FragmentBreadCrumbs, FrameLayout,
GridLayout, LinearLayout, PagerTitleStrip, RelativeLayout, SlidingDrawer, SlidingPaneLayout,
向ViewGroup类中添加子View
View不能有子节点
获取布局填充器对象
法1:LayoutInflater inflater=LayoutInflater.from(MainActivity.this);
法2:LayoutInflater inflater=getSystemService(LAYOUT_INFLATER_SERVICEE);
法3:layouInflater inflater=getlayoutInflater();
getSystemService()得到需要的管理器
单选对话框
setSingleChoiceItems();
dismiss()对话框消失
多选对话框
setMultiChoiceItems()
addView();
已知子类
AbsoluteLayout, AdapterView<T extends Adapter>, DrawerLayout, FragmentBreadCrumbs, FrameLayout,
GridLayout, LinearLayout, PagerTitleStrip, RelativeLayout, SlidingDrawer, SlidingPaneLayout,
向ViewGroup类中添加子View
View不能有子节点
获取布局填充器对象
法1:LayoutInflater inflater=LayoutInflater.from(MainActivity.this);
法2:LayoutInflater inflater=getSystemService(LAYOUT_INFLATER_SERVICEE);
法3:layouInflater inflater=getlayoutInflater();
getSystemService()得到需要的管理器
单选对话框
setSingleChoiceItems();
dismiss()对话框消失
多选对话框
setMultiChoiceItems()