Android: Layer Drawable Loses Information
I am messing around with creating my own dialog class, but I've run into an interesting issue. I use a layer-list drawable for the dialog's close button, but for some reason, the
Solution 1:
Well, I've found the issue. The problem only shows up when you use the "padding" tag. I have no idea why, maybe it is a bug. I was able to work around it by changing my dialog_close_button.xml accordingly:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="#88888888" />
</shape>
</item>
<item
android:left="1dp"
android:right="1dp"
android:bottom="4dp">
<shape android:shape="oval">
<solid android:color="@color/white" />
</shape>
</item>
<item
android:drawable="@drawable/ic_close"
android:left="1dp"
android:right="1dp"
android:bottom="4dp" />
</layer-list>
Post a Comment for "Android: Layer Drawable Loses Information"