是什么在Android的活动和意图之间的区别? [英] What's the difference between activity and intent in Android?

查看:184
本文介绍了是什么在Android的活动和意图之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以向我解释的活动和Android平台上的意图之间的区别?

Can anyone explain to me the difference between an "Activity" and an "Intent" on the Android platform?

推荐答案

在非常简单的语言。活动是你的用户界面,你可以用一个用户界面做什么都。当你从一个用户界面打动你需要启动新的用户界面的意图。的意图是与从所述第一用户界面到另一个数据一起传递的事件

In very simple language. Activity is your user interface and what ever you can do with a user interface. When you move from one user interface you need to launch that new user interface with an intent. The intent is your event that is passed along with data from the first user interface to another.

意图可以在用户界面和后台服务之间也可以使用。另外一个意图传递,当你要广播数据,所有的活动和后台服务。

Intents can be used between user interfaces and background services too. Also an intent is passed when you want to broadcast data to all activities and background services.

意向生活为对象,活动居住着一张脸和相互作用。希望这是有帮助的。

Intent lives as a object, activity lives with a face and interactions. Hope it has been helpful.

这篇关于是什么在Android的活动和意图之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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