| |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
-> 移动开发 -> chrome的Views概述 -> 正文阅读 |
|
[移动开发]chrome的Views概述 |
Views OverviewThis document is an overview of Views concepts, terminology, and architecture. General Things概述Points in this document are written as Views uses a coordinate system with Views generally take ownership of objects passed to them even via raw pointers, although there are some exceptions, such as delegates. ViewsA View is a UI element, similar to an HTML DOM element. Each View occupies a rectangle, called its bounds, which is expressed in the coordinate system of its parent View. Views may have child Views, which are laid out according to the Each View can calculate different sizes, which are used by the View’s parent It is generally not a good idea to explicitly change the bounds of a View. For more details about Views, see view.h. BorderThe border is conventionally drawn around the edges of the View’s bounding For more details, see border.h. BackgroundThe background is drawn below any other part of the View, including the For more details, see background.h. ContentThe content is the area inside the content bounds of the View. A View’s Layout & Layout ManagersA View’s layout manager defines how the View’s child views should be laid PaintingViews are painted by pre-order traversal of the View tree - i.e., a parent View is painted before its child Views are. Each View paints all its children inz-order, as determined by Different View subclasses implement their own painting logic inside If you need a special background or border for a View subclass, it is better to create a subclass of WidgetsViews need an underlying canvas to paint onto. This has to be supplied by the operating system, usually by creating a native drawing surface of some kind. Views calls these widgets. A Widget is the bridge between a tree of Views and a native window of some sort, which Views calls a native widget. Each Widget has a root view, which is a special subclass of View that helps with this bridging; the root view in turn has a single child view, called the Widget’s contents view, which fills the entire root view. All other Views inside a given Widget are children of that Widget’s contents view. Widgets have many responsibilities, including but not limited to:
For more details, see widget.h. Client and Non-Client ViewsThe contents view of most Widgets is a Non-Client View, which is either a NonClientView or one of its descendants. The Non-Client View has two children, which are the Non-Client Frame View (a NonClientFrameView) and the Client View (a ClientView). The non-client frame view is responsible for painting window decorations, the Widget’s border, the shadow, and so on; the client view is responsible for painting the Widget’s contents. The overall structure of a Widget and its helper Views looks like this:
DialogsA commonly-used type of client view is a dialog client view, which has a contents view, optional buttons on the lower-right, and an optional extra view on the lower-left. Dialogs are usually created by subclassing DialogDelegate or DialogDelegateView and then calling BubblesA common type of dialog is a bubble, which is a dialog that is anchored to a parent View and moves as the parent View moves. Bubbles are usually created by subclassing BubbleDialogDelegateView and then calling |
|
移动开发 最新文章 |
Vue3装载axios和element-ui |
android adb cmd |
【xcode】Xcode常用快捷键与技巧 |
Android开发中的线程池使用 |
Java 和 Android 的 Base64 |
Android 测试文字编码格式 |
微信小程序支付 |
安卓权限记录 |
知乎之自动养号 |
【Android Jetpack】DataStore |
|
上一篇文章 下一篇文章 查看所有文章 |
|
开发:
C++知识库
Java知识库
JavaScript
Python
PHP知识库
人工智能
区块链
大数据
移动开发
嵌入式
开发工具
数据结构与算法
开发测试
游戏开发
网络协议
系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程 数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁 |
360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年11日历 | -2024/11/24 1:25:19- |
|
网站联系: qq:121756557 email:121756557@qq.com IT数码 |