i want display textview right of image , textview below image. getting following output:
this getting in landscape mode:
imageview imageview textview textview
in portrait mode textview besides imageview not visible @ all
imageview imageview textview
desired output:
imageview imageview textview textview
xml
<linearlayout android:id="@+id/dialogimage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_marginright="5dip" android:baselinealigned="false" android:orientation="horizontal" android:padding="3dp" > <imageview android:id="@+id/dialog_image" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/dialog_image" /> <imageview android:id="@+id/profimage" android:layout_width="50dp" android:layout_height="50dp" android:layout_marginleft="10dp" android:layout_margintop="5dp" android:src="@drawable/member_80" /> <textview android:id="@+id/membervotes" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/votes_bg" android:text="388" android:textcolor="#343434" android:textsize="10dp" /> <textview android:id="@+id/username" android:layout_width="33dp" android:layout_height="wrap_content" android:layout_below="@+id/profimage" android:layout_gravity="bottom|fill_horizontal" android:layout_margintop="10dp" android:text="by hermoine - 2 days ago on politics" android:textcolor="#040404" android:textsize="8dp" android:textstyle="normal" android:typeface="sans" /> </linearlayout>
thanks,
if want: image image text text
you create linear layout vertical orientation hold image , text below it.
<linearlayout android:id="@+id/dialogimage" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignparentleft="true" android:layout_marginright="5dip" android:baselinealigned="false" android:orientation="horizontal" android:padding="3dp" > <imageview android:id="@+id/dialog_image" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/dialog_image" /> <linearlayout android:id="@+id/dialogimage2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" > <imageview android:id="@+id/profimage" android:layout_width="50dp" android:layout_height="50dp" android:layout_marginleft="10dp" android:layout_margintop="5dp" android:src="@drawable/member_80" /> <textview android:id="@+id/membervotes" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/votes_bg" android:text="388" android:textcolor="#343434" android:textsize="10dp" /> </linearlayout> <textview android:id="@+id/username" android:layout_width="33dp" android:layout_height="wrap_content" android:layout_below="@+id/profimage" android:layout_gravity="bottom|fill_horizontal" android:layout_margintop="10dp" android:text="by hermoine - 2 days ago on politics" android:textcolor="#040404" android:textsize="8dp" android:textstyle="normal" android:typeface="sans" /> </linearlayout>
Comments
Post a Comment