I have My Layout like below:
add something like this in your layout between the views you want to separate:
<View
android:id="@+id/SplitLine_hor1"
android:layout_width="match_parent"
android:layout_height= "2dp"
android:background="@color/gray" />
Hope it helps :)
Try this
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray"/>
In each parent LinearLayout
for which you want dividers between components, add android:divider="?android:dividerHorizontal"
or android:divider="?android:dividerVertical
.
Choose appropriate between them as per orientation of your LinearLayout
.
Till I know, this resource style is added from Android 4.3.
Try this works for me
<View android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/tw_composer" />
A View whose background color you can specify would do (height=a few dpi). Looked in real code and here it is:
<LinearLayout
android:id="@+id/lineA"
android:layout_width="fill_parent"
android:layout_height="2dp"
android:background="#000000" />
Note that it may be any kind of View
.
<View
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="#000000" />