jeudi 2 juillet 2015

Checkbox drawable with extra drawableLeft overlapping one another

When using a checkbox with extra drawable (besides the one used for the checkbox) using drawableLeft, the two drawables overlapp one another.

There is nothing special about the checkbox settings, here:

<CheckBox android:id="@+id/low_priority_checkbox"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/low_priority"
    android:textColor="@color/primary_text"
    android:textAppearance="?android:attr/textAppearanceSmall"
    android:drawableLeft="@drawable/ic_primary_priority_flag_low_medium"/>

Actual result:

enter image description here

Expected result:

enter image description here

This problem occurs with compileSdkVersion 22 on devices with API <= 16

By the way, using drawableRight works as it should.

Is this a bug in the framework? Any workaround?




Aucun commentaire:

Enregistrer un commentaire