Background doesn't wrap on multi-line TextView



I have the following TextView with layout_width set to "wrap_content", like so



<TextView
android:id="@+id/my_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignBaseline="@+id/another_text_view"
android:layout_toRightOf="@+id/another_text_view"
android:background="@drawable/nice_background"
android:paddingLeft="15dp"
android:paddingTop="1dp"
android:paddingBottom="1dp"
android:layout_marginBottom="8dp"
android:duplicateParentState="true"
android:visibility="invisible" />


And this is what happens:



No comments:

Post a Comment