Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

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);

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!

like image 631
aveyD Avatar asked May 13 '11 20:05

aveyD


1 Answers

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

like image 81
Romain Guy Avatar answered Oct 22 '22 06:10

Romain Guy