`

Android View的介绍和使用

阅读更多

 

In an Android application, the user interface is built using View  and ViewGroup  objects. There are many types of views and view groups, each of which is a descendant of the View  class.

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.

Android应用程序中,用户界面的构造是使用View和ViewGroup对象。View 和View Groups的种类很多,每一种都是View类的子类。

在Android平台,View对象是用户界面表现的基本单元。View对于子类最基本的服务叫“widgets”,它提供了一个全部实现的UI对象,比如输入框(text fields)和按钮(buttons).ViewGroupd对于子类最基本的服务叫“layout”,它提供了各种不同的布局格式,比如线式布局(linear),便签式布局(tabular)和相对式布局(relative)。

View对象是一个数据结构,其属性是为屏幕指定的的长方形区域保存布局(layout)参数很内容。View对象对于屏幕的长方形区域处理尺寸,布局,绘画,焦点变化,滚动,键盘/手势等互动,作为用户界面的对象,View对于用户也是一个活动点接收互动的事件。

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics