widget ----ViewGroup~~~
16lz
2021-01-23
<ViewGroupClass xmlns:android="http://schemas.android.com/apk/res/android"id="@+id/string_name" (attributes)><widget or other nested ViewGroupClass>+<requestFocus/>(0 or 1 per layout file, assigned to any element)</ViewGroupClass>这里面有一个比较重要的类叫ViewGroup,这个XML的root节点必须是一个ViewGroup,或者是一个单一的Widget(整个XML只有一个元素)。Android几乎所有的UI似乎都和ViewGroup有或多或少的关系。但是它只是一个abstract class,并不能直接使用,我们能用的,是它的一些子类,例如:AbsoluteLayoutFrameLayoutLinearLayoutRelativeLayoutTableLayout
更多相关文章
- Android无法自动创建USB打印机节点/dev/usb/lp0
- Android设备节点的动态管理
- Android如何生成设备节点
- 二、Android应用的界面编程(六)ProgressBar及其子类[SeekBar、Rati
- Android用户界面 UI组件--TextView及其子类(二) Button,selector
- Android 中关于PathEffect子类的效果(中级)
- android 从Activity 获取 rootView 根节点
- android之Buffer类及子类学习