从另一个应用程序请求查看和查看更新

发布于 2024-08-08 03:37:24 字数 222 浏览 4 评论 0原文

我正在寻找创建一个具有插件功能的应用程序。我想要的是允许一个单独的插件“应用程序”为我提供视图,并负责更新我将在列表适配器中使用的视图。本质上,我希望单独的应用程序处理适配器的 bindViewnewView 方法。

我正在查看 RemoteViews,但我不确定这是否正是我所需要的,它是否有效,或者可能是我必须使用的,因为它是跨进程的。

感谢您的帮助。

I am looking to create an app with plugin functionality. What I want is to allow a separate plugin "app" to provide me with the view, and take care of the updating of the view that I will use in my list adapter. Essentially, I want the separate app to take care of the bindView and newView methods of my adapter.

I am looking at RemoteViews, but I am not sure if that is exactly what I need, if it would work, or maybe it's what I have to use, since it would be cross-process.

Thanks for your help.

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

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

发布评论

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

评论(1

够钟 2024-08-15 03:37:24
  1. RemoteViews 是唯一模糊实用的东西,因为您是在进程之间通信。

  2. 性能会很糟糕。当一切都在一个进程中时,让ListView快速运行需要一些工作。跨越每一行的进程边界要么非常慢,要么占用大量内存。例如,这就是为什么 ContentProviderquery() 上返回其完整结果集,以避免数十或数百次额外的 RPC 调用。

我强烈建议您重新考虑您提出的架构。

  1. RemoteViews is the only thing vaguely practical, because you are communicating between processes.

  2. Performance will be awful. Getting a ListView to behave quickly when everything is in one process takes a bit of work. Going across process boundaries for every row will either be very slow and memory intensive. This is why, for example, ContentProvider returns its full result set on a query(), to avoid dozens or hundreds of extra RPC calls.

I strongly suggest you reconsider your proposed architecture.

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