在Android的性能RemoteViews [英] Performance RemoteViews in Android

查看:292
本文介绍了在Android的性能RemoteViews的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写在Android的一个小应用程序。我的应用程序在窗口小部件。我有使用RemoteViews一个基本的疑问。我发现,每当我更新一些按钮,或一些UI布局remoteviews的新对象被创建。这是否与性能的问题吗?一个例子code是这样的:

I am trying to write a small application in Android. My application is on Widgets. I have a basic doubt on using RemoteViews. I found that whenever , I update some button or some UI layout a new object of the remoteviews is created . Will that be a problem with the performance? an example code is this:

http://android-developers.blogspot.com/2009/04/introducing-home-screen-widgets-and.html

updateViews = new RemoteViews(context.getPackageName(), R.layout.widget_message);

甚至每次更新的意见,创建新的远程视窗对象。请帮我理解这一点。

even for updating the views everytime, new remoteview object is created. Please help me in understanding this.

推荐答案

没有这不是一个问题。我与 StackViewsWidget工作例如建立具有蜂窝状部件RemoteViews在那买洗牌意见甲板每张卡,每个卡被回收,从我可以在调试器告诉重建,它的顺利通过我的Xoom的看法黄油翻转。

No it isn't a problem. I'm working with StackViewsWidget example to build a honeycomb widget that has a RemoteViews for each card in the deck of views that shuffle buy, and each card is recycled and rebuilt from what I can tell in the debugger, and it's smooth as butter flipping through the views on my Xoom.

这篇关于在Android的性能RemoteViews的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆