开发者

Customize the Android contact picker

I'd like to present a Contact picker, but add additional prompting when the picker is opened. On 1.5 the title is simply "Contacts".

I was thinking I could add an EXTRA_TITLE to the Intent which opens the picker, but it supposedly only works开发者_如何学Python on ACTION_CHOOSER, not ACTION_PICK.

Or do I have to roll my own Contact picker?


If you want functionality beyond what the built-in activities do, you must build your own version, and specify IntentFilters that match those of the activity you wish to "mimic".

Be advised, this does not simply "replace" any built-in activity's functionality. The system will automatically present a Chooser to the user, who may or may not pick your activity to complete the action.

Adding your own "extras" to a "system-replacement" activity has dubious value; everything else in the system will not know about your extras, and not send them!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜