Android的隐含意图VS明确意图 [英] Android implicit intents VS explicit intents

查看:176
本文介绍了Android的隐含意图VS明确意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与Android合作,我意识到,隐含的意图是,在大多数情况下很好的选择,因为它们的灵活性。但是,什么是对明确的意图? 什么是使用它们的好处是什么?什么是常见的情况时,它的使用它们一个好的做法呢?

Working with android I realized that implicit intents are good choice in most of cases due to their's flexibility. But what's about explicit intents? What are benefits of using them? What are common cases when it's a good practice to use them?

推荐答案

您通常使用显式意图为在自己的应用程序启动活动。在这一点上你确切地知道要启动哪些活动,所以没有理由去通过建立隐性意图的额外的工作。

You typically use explicit intents for starting activities within your own application. At that point you know exactly which activity you want to start, so there is no reason to go through the extra work of setting up the implicit intents.

这篇关于Android的隐含意图VS明确意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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