Android XML Layout - a picture with a TextView on it -
i'm working on xml layout in app , want make imageview
have piece of text on (i want have textview
on it). anyway, less words , more examples. want this:
i know best way make (with opaque strip , preferably text stretch or shrink depending on length of name. though think might figure stretching out myself).
you can create relativelayout
imageview
, textview
2 children
<relativelayout android:layout_width="wrap_content" android:layout_height="wrap_content" > <imageview android:id="@+id/myimageview" android:layout_width="150dp" android:layout_height="75dp" android:src="@drawable/myimage" /> <textview android:id="@+id/mytextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="@+id/myimageview" android:layout_alignparentleft="true" android:layout_alignright="@+id/myimageview" android:background="@drawable/mybackground" android:gravity="center" /> </relativelayout>
Comments
Post a Comment