Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an empty Drawable in Android

Tags:

android

Creating a Drawable that is completely empty seems like a common need, as a place holder, initial state, etc., but there doesn't seem to be a good way to do this... at least in XML. Several places refer to the system resource @android:drawable/empty but as far as I can tell (i.e., it's not in the reference docs, and aapt chokes saying that it can't find the resource) this doesn't exist.

Is there a general way of referencing an empty Drawable, or do you end up creating a fake empty PNG for each project?

like image 482
Kai Avatar asked Feb 10 '10 03:02

Kai


1 Answers

For me it didn't work when I tried to use @android:id/empty when making an empty drawable. For me, @android:color/transparent was the one.

like image 110
Emil Avatar answered Sep 22 '22 18:09

Emil