ffimageloading - Organize layout xamarin -
i have following command in layout , want organize layout textview category stays on ffimageloading
<linearlayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_weight="1" android:layout_gravity="center" android:gravity="center" android:background="#000000" android:id="@+id/l_imgf1f2"> <linearlayout android:layout_width="0dip" android:layout_height="125dp" android:orientation="vertical" android:gravity="bottom" android:layout_weight="1" android:id="@+id/imgf1" android:layout_marginright="2dp"> <ffimageloading.views.imageviewasync android:id="@+id/imazhi" android:layout_width="100dp" android:layout_height="80dp" android:scaletype="centercrop" android:layout_marginleft="4dp" android:backgroundtint="#00000000" /> <textview android:id="@+id/categoryf1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="category" android:textsize="12dp" android:padding="2dp" android:textcolor="#ffffff" android:gravity="left" /> </linearlayout>
i want layout organized this, in picture enter image description here
you aren't going able use linearlayout
here. purpose of linearlayout
stack views
1 after other. should use relativelayout
, on textview
, set android:layout_alignbottom="true"
, set android:layout_margin
appropriate moved , right bit. here's of together:
<linearlayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_weight="1" android:layout_gravity="center" android:gravity="center" android:background="#000000" android:id="@+id/l_imgf1f2"> <relativelayout android:layout_width="0dip" android:layout_height="125dp" android:gravity="bottom" android:layout_weight="1" android:id="@+id/imgf1" android:layout_marginright="2dp"> <ffimageloading.views.imageviewasync android:id="@+id/imazhi" android:layout_width="100dp" android:layout_height="80dp" android:scaletype="centercrop" android:layout_marginleft="4dp" android:backgroundtint="#00000000" /> <textview android:id="@+id/categoryf1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbottom="true" android:layout_marginleft="8dp" android:layout_marginbottom="8dp" android:text="category" android:textsize="12dp" android:padding="2dp" android:textcolor="#ffffff" android:gravity="left" /> </relativelayout>
Comments
Post a Comment