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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With