为“好”提供大图像(双核)手机和更小、分辨率更低的手机
我的应用程序中有几张图像,它们以各种方式呈现动画。 问题是“较弱”的手机,例如三星 Galaxy S1,无法流畅地显示这些动画。 相比之下,动画在配备双核处理器的三星 Galaxy S2 上运行得非常流畅。
我发现,当使用分辨率较低的图像时,我可以使这些动画流畅地运行。 问题:如果可以使用高分辨率图像,我不想使用低分辨率图像,因为它们看起来更好。
我可以通过编程方式检查 cpu 的数量,但这不是最好的方式,不是吗?
这会很酷,我可以让 android 检测到这一点,所以我只需要编写 imageView.setImage(R.drawable.tree);无论是单核还是双核,都会设置合适的镜像。
I got several images within my app which are animated in various ways.
The problem is that 'weaker' phones, e.g. Samsung Galaxy S1 can't show these animations fluently.
In contrast, animations run very smoothly on the Samsung Galaxy S2 which has an dual core processor.
I have found out, that I can get these animations run fluently when using less-resolution images.
Problem: I don't want to use low-resolution images if I can use high-resolution ones, as these look better.
I could check programatically what's the number of cpus, but that wouldn't be the best style, would it?
It would be cool, I could let android detect this, so I just need to write imageView.setImage(R.drawable.tree); and wheter single core or dual core, the appropriate image is set.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能会有所帮助。尽管它是针对屏幕密度而不是 CPU 功率而设计的。
This might help. Although it's designed for screen density, not CPU power.