开发者

android.R.id.empty broken in Xoom/Honeycomb?

开发者 https://www.devze.com 2023-03-06 06:38 出处:网络
I have been trying to make radio buttons without the dot whic开发者_运维百科h toggles. I have been successful by doing this:

I have been trying to make radio buttons without the dot whic开发者_运维百科h toggles. I have been successful by doing this:

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

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

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

Thanks!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消