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对于用户也是一个活动点接收互动的事件。
分享到:
相关推荐
android view的旋转 源码 android view的旋转android view的旋转android view的旋转android view的旋转
Compose 和 Android 传统View 互相调用 示例 Demo Sample,以及在双层嵌套(原生View嵌套Compose,Compose中又嵌套原生View)的情况下,在最外层原生View中,怎么获取到Compose内部的原生View。 具体详见我的博客 : ...
android NavigationView的使用
Android View 3D旋转
Android View 事件传递与消费,用于view事件传递的理解。
使用方法可见示例: 子View遍历 ViewGroup root = (ViewGroup) findViewById(android.R.id.content); LayoutTraverser.build(new LayoutTraverser.Processor() { @Override public void process(View view) { //...
Android View转成Bitmap
Android中View绘制流程
Android 使用BottomNavigationView实现底部导航栏,在Android Support Library 25 中增加了 BottomNavigationView 控件,官方为我们提供了这样这一个控件。
一个线程控制View的代码实例,其中主要使用了两种方式:Post方式和Handler方式。
在android里面通过view画线,小弟的练习作品
Android中自定义View操作Android中自定义View操作Android中自定义View操作
android view变化监听器ViewTreeObserver的简单使用 五种监听博客介绍:http://blog.csdn.net/qq_33078541/article/details/50680496
Android自定义View实现转盘旋转的效果
用于涂鸦的自定义Android View
android-pdfview是一个Android类库,提供一个快速读取显示Android PDF文件的组件——PDFView,该组件支持手势、动画和缩放。并且基于Google的VuDroid类库解码PDF文件。可以通过手势滑动PDF文件、对PDF文件进行放大...
android view的使用方法例子 可以参考里面的代码1
android项目下对图片高斯模糊毛玻璃,自定义view,模糊程度可控制,高斯模糊毛玻璃,自定义view,模糊程度可控制
创建全新的视图将满足我们独特的UI需求。 本文介绍在指南针开发中会用到的罗盘的界面UI,通过继承View类实现的自定义视图,以此来深刻了解自定义视图。