如何在Android平台相关的活动和意见? [英] How are activities and views related in the Android platform?

查看:91
本文介绍了如何在Android平台相关的活动和意见?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解如何开发在Android平台上,但不太了解活动和观点之间的关系,因为根据文档的活动几乎总是与一个UI对象,用户可以交互,但如果这是哪里观的整体思路进来的情况?

I am attempting to learn how to develop on the Android platform but do not quite understand the relationship between Activities and Views, because according to the documentation an Activity is almost always linked to a UI object that the user can interact with, but if this is the case where does the whole idea of Views come in?

有可能是一个非常基本的解释,但我会AP preciate几个指针都是一样的。谢谢

There is probably a very basic explanation but I would appreciate a few pointers all the same. Thanks

推荐答案

活动是用于执行一些任务的用户界面,以及更接近你可能会觉得作为一个表格窗口其他框架。 A 查看是窗口的自我控制的矩形截面的相互作用可发生在,并且是用户界面的很多低级别再presentation。这是更接近你可能会觉得当你听到控制控件在不同的框架。

An activity is a user interface for carrying out some task, and is closer to what you might think of as a Form or Window in other frameworks. A View is a self-controlled rectangular section of a window that interaction can occur in, and is a much lower-level representation of UI. It's closer to what you might think of when you hear Control or Widget in a different framework.

一个窗口的视觉内容是由次,这是从基View类派生的对象层次结构提供。每个视图控制窗口内的矩形空间。父视图包含并组织其子项的布局;叶的观点,在层次结构的底部,实际绘制在他们控制的矩形,并响应用户的操作。因此,一个观点就是与用户活动的互动确实发生。

The visual content of a window is provided by a hierarchy of views, which are objects derived from the base View class. Each and every view controls a rectangular space within the window. A parent view contains and organizes the layout of its children; leaf views, at the bottom of the hierarchy, actually draw in the rectangles they control and respond to user actions. Thus, a view is where an activity's interaction with the user actually takes place.

您可能会想读 Android的基础 ;这是Android的文件中一个很好的起点。

You'll probably want to read Android Fundamentals; it's a good starting point in the Android documentation.

这篇关于如何在Android平台相关的活动和意见?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆