Creating an empty Drawable in Android

前端 未结 8 900
陌清茗
陌清茗 2021-02-05 00:15

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

8条回答
  •  不思量自难忘°
    2021-02-05 00:53

    For me, using @android:drawable/empty would show an error and prevent compiling. Using @android:id/empty fixed the error and let me compile, but showed "NullPointerException: null" in the Eclipse Layout editor. I changed it to @android:color/transparent and now everything is fine.

    I can't vote up yet or I would have up'ed Emil's answer.

提交回复
热议问题