Reputation: 409
Sorry by my english
I have one RelativeLayout and 2 textviews like that
<RelativeLayout
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
And I want to separate the two elements by points. Like that:
TextView9 ...................................... TextView10
Other Text more long ................................... 69
Upvotes: 3
Views: 386
Reputation: 7087
Without java code:
drawable/dotted.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="#C7B299"
android:dashWidth="10px"
android:dashGap="10px" />
</shape>
view.xml:
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/dotted" />
And also set:
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
Upvotes: 1