android.R.id.empty打碎了的Xoom /蜂巢? [英] android.R.id.empty broken in Xoom/Honeycomb?

查看:144
本文介绍了android.R.id.empty打碎了的Xoom /蜂巢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力使单选按钮没有这些切换点。我已经成功通过执行此操作:

I have been trying to make radio buttons without the dot which toggles. I have been successful by doing this:

myRadioButton.setButtonDrawable(android.R.id.empty);

这工作正常,在所有设备蜂窝3.0.x相同之前当我尝试并使用Xoom的空的资源我得到一个错误:

this works fine in all devices before Honeycomb 3.0.x. When I try and use the "empty" resource on the Xoom i get an error:

ERROR/AndroidRuntime(xxxxx): Caused by: android.content.res.Resources$NotFoundException: File  from drawable resource ID #0x1020004

所以,我在想,如果有一个原因空资源突然上不Xoom的工作。任何帮助将是AP preciated。如果你想看看在相关单选按钮后可以发现<一href="http://stackoverflow.com/questions/5821669/android-dynamic-radiogroup-radiobuttons-as-flat-buttons%20%60here%60">here

so, I was wondering if there was a reason why the empty resource suddenly doesn't work on the Xoom. Any help would be appreciated. If you want to take a look at the radioButton related post it can be found here

谢谢!

推荐答案

您正在尝试使用一个ID作为绘制。您需要使用android.R.color.transparent代替。

You are trying to use an id as a drawable. You need to use android.R.color.transparent instead.

这篇关于android.R.id.empty打碎了的Xoom /蜂巢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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