从另一个应用程序请求查看和查看更新
我正在寻找创建一个具有插件功能的应用程序。我想要的是允许一个单独的插件“应用程序”为我提供视图,并负责更新我将在列表适配器中使用的视图。本质上,我希望单独的应用程序处理适配器的 bindView 和 newView 方法。
我正在查看 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RemoteViews
是唯一模糊实用的东西,因为您是在进程之间通信。性能会很糟糕。当一切都在一个进程中时,让
ListView
快速运行需要一些工作。跨越每一行的进程边界要么非常慢,要么占用大量内存。例如,这就是为什么ContentProvider
在query()
上返回其完整结果集,以避免数十或数百次额外的 RPC 调用。我强烈建议您重新考虑您提出的架构。
RemoteViews
is the only thing vaguely practical, because you are communicating between processes.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 aquery()
, to avoid dozens or hundreds of extra RPC calls.I strongly suggest you reconsider your proposed architecture.