i need to add a line of dots to my layout like this
this is my layout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/deals_list_item_bckg"
android:orientation="horizontal" >
<ImageView
android:id="@+id/dealImg"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="fitXY"
android:src="@drawable/deals_list_img" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:orientation="vertical" >
<TextView
android:id="@+id/dealDescription"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:layout_marginTop="5dp"
android:maxLines="3"
android:text="Lorem Ipsum dolor sit amet dolor sed a ite amkt Lantin dolor latim dk kuitshen sed iditur anet" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/dealNewPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:text="1248$"
android:textColor="@color/deals_list_new_price"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/dealOldPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/dealNewPrice"
android:text="2500$"
android:textColor="@color/deals_list_old_price"
android:textSize="15sp" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
in which way i can do this thing i also try using a ShapeDrawable but still not understand how it works i need an example to see how it work and how do this in may layout between description textview and prices textviews
Try this
Note: in Higher versions, without
android:layerType
attribute will not work. Now addandroid:layerType
attribute withsoftware
value as belowFor more details see LAYER_TYPE_SOFTWARE
Your updated layout should be as below
dash line is
dash_line.xml
drawable/dot_repeated.xml
layout