显示内容然后返回调用 Activity 的最佳方式

发布于 2024-12-23 18:22:29 字数 177 浏览 4 评论 0原文

我想从联系人内容提供程序中获取名称和电话号码值并将其显示给用户,以便他/她可以选择这些联系人中的 1..N 个。我希望这个“活动”从调用它的活动中弹出。

AlertDialog 是解决这个问题的最佳方法吗?或者,我可以将其作为一个单独的 用户完成创建后返回到调用它的 Activity 的 Activity 选择...

I want to grab the Name and PhoneNumber vals from the Contacts Content Provider and display them to the user so that s/he can select 1..N of those Contacts. I would like this "Activity" to pop up out of the Activity which invokes it.

Is an AlertDialog the best way to tackle this? Alternatively, I could make it a separate
Activity that returns to the Activity that invoked it once the user has finished making
the selections...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终陌 2024-12-30 18:22:29

您提出的两种方法都可以。哪一个最好取决于您的应用程序的许多其他因素。

Both of the methods you've proposed would work. Which is best depends on many other things about your application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文