android - TextView below ImageView -
i can't place label want. show picture.
i have following code:
<relativelayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:layout_weight="1" android:orientation="vertical" > <textview android:id="@+id/textviewnombrevideo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/imageviewlogo" android:layout_alignparentbottom="true" android:layout_alignright="@+id/imageviewlogo" android:lines="2" android:scrollhorizontally="false" android:singleline="false" android:text="medium text" android:textappearance="?android:attr/textappearance" android:textcolor="@android:color/white" android:textcolorlink="@android:color/white" android:textstyle="bold" /> <imageview android:id="@+id/imageviewlogo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@+id/textviewnombrevideo" android:layout_centerhorizontal="true" android:layout_margin="4dp" android:adjustviewbounds="true" /> </relativelayout>
the picture fit heigh of imageview, that's ok, , want place textview same left of picture.
is possible that?
try code.
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center" android:layout_weight="1" android:orientation="vertical" > <textview android:id="@+id/textviewnombrevideo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:layout_alignleft="@+id/imageviewlogo" android:layout_alignparentbottom="true" android:layout_alignright="@+id/imageviewlogo" android:lines="2" android:scrollhorizontally="false" android:text="medium text" android:textappearance="?android:attr/textappearance" android:textcolor="@android:color/black" android:textcolorlink="@android:color/white" android:textstyle="bold" android:layout_marginbottom="10dp" /> <imageview android:id="@+id/imageviewlogo" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_above="@+id/textviewnombrevideo" android:layout_centerhorizontal="true" android:layout_margin="4dp" android:src="@drawable/ic_launcher" android:adjustviewbounds="true" /> </relativelayout>
below ui design fron code. per requirement.
Comments
Post a Comment