To complete Camille Sévigny answer you can additionally define your own line shape for example to custom the line color.
Define an xml shape in drawable directory. line_horizontal.xml:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" android:shape="line">
<stroke android:width="2dp" android:color="@android:color/holo_blue_dark" />
<size android:width="5dp" />
</shape>
Use this line in your layout with the wished attributes:
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="2dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="2dp"
android:src="@drawable/line_horizontal" />