Android User Interface的疑惑
View objects are the basic units of user interface expression on the Android platform. The View class serves as the base for subclasses called "widgets," which offer fully implemented UI objects, like text fields and buttons. The ViewGroup class serves as the base for subclasses called "layouts," which offer different kinds of layout architecture, like linear, tabular and relative.
A View object is a data structure whose properties store the layout parameters and content for a specific rectangular area of the screen. A View object handles its own measurement, layout, drawing, focus change, scrolling, and key/gesture interactions for the rectangular area of the screen in which it resides. As an object in the user interface, a View is also a point of interaction for the user and the receiver of the interaction events.
以上一段是google官方对android user interface的介绍。
首先看In an Android application, the user interface is built using View and ViewGroup objects.
我的理解是这样的:
用户界面是构建在"View"和"ViewGroup"对象之上的。这里我的疑问是:View 对象是何物?是不是可以这样理解:
class View()
{
//properties
....
//methods
....
}
这只是一个类,按照我对面向对象模糊的认识:应该由这个类生产一个对象
View view = new View();
这样,似乎就做出了一个view对象,不知可否这样理解呢?我觉得这样的理解肯定是不对的。换句话说:这里的“对象”二字该如何解释?
对于"ViewGroup",有着同样的疑惑。
接着往下看:There are many types of views and view groups, each of which is a descendant of the View class.
这句话说的是什么呢?View类的后代有很多类型的"views"和"view groups"?我无法理解。
继续看:View objects are the basic units of user interface expression on the Android platform. The View class serves as the base for subclasses called "widgets," which offer fully implemented UI objects, like text fields and buttons. The ViewGroup class serves as the base for subclasses called "layouts," which offer different kinds of layout architecture, like linear, tabular and relative.
这一段的大概意思是说:View对象是Android平台用户界面的基本单元,“View”类是“widgets”类的基类,基本用来提供界面上的小对象,比如按钮之类的。"ViewGroup"类是"layouts"类的基类,是用来提供布局架构的。不知道对不对,还请各位斧正
接下来看最后一段:
A View object is a data structure whose properties store the layout parameters and content for a specific rectangular area of the screen. A View object handles its own measurement, layout, drawing, focus change, scrolling, and key/gesture interactions for the rectangular area of the screen in which it resides. As an object in the user interface, a View is also a point of interaction for the user and the receiver of the interaction events
我的理解是这样的:“View” 对象是一数据结构:其"properties(性质)"存储“布局”参数。“and content for a specific rectangular area of the screen”这紧接着的一句,我不知是何意。
"A View object handles its own measurement,layout,drawing,focus change, scrolling ...."
这句的意思是否是:"View"对象"handle"(掌管?这里的handle如何理解才合理?)着自己的很多性质“比如 layout,drawing,等等”,最后一句大概是说:View还是用户和事件交互的纽带。
还有一个问题:第二段明明说:"View Class"是负责界面上的小玩意的,比如按钮等等,而“ViewGroup Class”则是负责界面布局的。但第三段中说明了"View object"中的"property"存储了布局参数。这我就不理解了?那还用ViewGroup Class干嘛?
深深感觉小弟理解能力有问题,看Android 的 SDK ,很难理解。
看Android的书,更是不好理解....
这里,请大家帮我看看....谢谢啦
相关推荐
[书籍]安卓用户界面开发入门-Android User Interface Development
安卓用户界面开发(Android User Interface Development):安卓用户界面开发是安卓应用开发的一个重要组成部分,专注于创建和优化用户与应用交互的界面和体验。
Lithe-IDEA:专为Spring Boot优化的轻量级Java IDE
Java IDE 是支撑企业级 Spring Boot 开发的核心工具,其性能与生态适配性直接影响开发效率与交付质量。传统方案依赖插件禁用或配置调优,但底层仍承载全栈平台开销;而 Lithe-IDEA 从 IntelliJ Platform 构建层切入,通过平台级裁剪、Java/Spring Boot 专属 PSI 解析、极简 UI 框架重构,实现启动速度提升 5 倍、内存占用降低 3.7 倍。它不是简单的‘精简版 IDEA’,而是面向微服务团队、教学环境与云原生 CI/CD 场景的可嵌入式开发内核,天然兼
Android User Interface Development Beginner's Guide.pdf
"Android User Interface Development Beginner's Guide" 是一本专为初学者设计的指南,旨在教授如何为Android应用程序创建吸引人的用户界面。作者
user-interface-samples:多个示例显示了Android用户界面中的最佳做法
在Android应用开发中,用户界面(User Interface, UI)的设计和实现是至关重要的,它直接影响到用户的体验和应用的受欢迎程度。"
android-user-interface-development.rar_android
android-user-interface-development.rar_android"这个压缩包包含了一份名为"android user interface development.doc"的文档


J2ME
