Issue
I want to made the listView that will looks like this
I suppose i need to use Frame layout in every Item and set margins to fit the left shape half outside the single item, but I dont know how to adjust it properly
I already have drawable shape I only need to set it up like on the picuture
edit: Maybe I need to place the drawable shape In my custom rounded_item_that looks like that
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke
android:width="1dp"
android:color="@color/gray" />
<solid android:color="@color/white" />
<padding
android:left="5dp"
android:right="5dp"
android:top="5dp"
android:bottom="10dp"/>
<corners android:radius="5dp" />
</shape>
Solution
This might help you
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/layout1"
android:layout_width="200dp"
android:layout_height="100dp"
android:background="#f1c21e"
android:layout_centerHorizontal="true"
android:orientation="horizontal" />
<LinearLayout
android:layout_width="50dp"
android:layout_height="50dp"
android:background="#000000"
android:layout_alignStart="@+id/layout1"
android:layout_alignLeft="@+id/layout1"
android:layout_centerVertical="true"
android:layout_marginLeft="-25dp"/>
<!--set margin to half the width of the layout-->
</RelativeLayout>
Answered By - Rajesh Gosemath
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.