为什么一个"意向选择"存在的话,它用来做什么?的话、来做、意向、它用

2023-09-07 14:33:43 作者:- Emp″滥竽充数

Android的意图类提供了一个名为 setSelector 的API。我想了解它的文档。

Android's Intent class provides an API called setSelector. I am trying to understand it from the example given in the documentation.

我要问为什么机器人需要添加这个API?什么是打破了这一意向API之前?

I want to ask that why did Android need to add this API ? What was breaking in Intent before this API ?

推荐答案

据我的理解,它给选择的用户他要选择哪个意图。在这个文件,他们已经给它赋予的选择意向的用户是否要打开应用程序的主要活动还是要发动任何差异的应用程序/活性比用户的应用程序等。这是我从该文件的理解。检查此链接,供您参考: https://开头code.google.com/p/android/issues/detail?id=67162 和放大器; http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.4_r1/android/content/Intent.java#Intent.setSelector%28android.content.Intent%29

According to my understanding, it gives choice to user which intent he wants to select. In that documentation they have given that it gives selection of intents whether user wants to open app's main activity or wants to launch any diff app/activity other than user's app. This is what i understood from that documentation. Check this links for your reference : https://code.google.com/p/android/issues/detail?id=67162 & http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.4_r1/android/content/Intent.java#Intent.setSelector%28android.content.Intent%29