2
Maybe it’s a simple situation, but I’ve already cracked my head a little bit here and I haven’t succeeded yet.
I have a button, and inside it I upload an image and text.
<Button
android:id="@+id/btNovaPreVenda"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="16dp"
android:background="@drawable/shape"
android:drawableLeft="@drawable/carrinhodecompras"
android:paddingTop="1sp"
android:text=" | Nova Pré-Venda"
android:textColor="@color/branco" />
Only that by layout_width be set as fill_parent
, the image is on the left and the text is centered.
However, if I put layout_width as wrap_content, it works because the button will be created of the required size.
Any idea how to leave the layout_width
as fill_parent
and the image is centered on the text?
has how to take a print to view better
– Rogers Corrêa
@Rogerscorrêa - Add the print. Thanks!
– emanuelsn
and I’ll tell you that aesthetically the way it is is much more beautiful than the one you want to put... : P As you want to do, it gets a little disorganized passes the impression of mess the menu.(Sincerity). I think it’s best to keep it as it is.
– Rogers Corrêa
I tbm think that the way it is (aligned to the left) is good. But they did not approve. They want to join the text. kkk
– emanuelsn