Android - need to draw a line with a cross in the middle -


i have view has seekbar , below seek bar want display minimum , maximum values line between them has small cross @ middle point. have in xml layout apart line cross. can define shape in xml or need draw @ runtime?

edit

i used 9-patch small patch area produce following cross effect:

enter image description here

create view in xml file 1dp or 2dp height , put background color view become line

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="50dp" android:background="@color/listcolor" >  <textview     android:id="@+id/listtext"     android:layout_width="match_parent"     android:layout_height="40dp"     android:layout_marginleft="5dp"     android:layout_marginright="60dp"     android:gravity="center_vertical"     android:background="@drawable/header_list_item_selector"     android:textcolor="@android:color/white"     android:textsize="15sp"/>  <view    android:layout_width="wrap_content"    android:layout_height="2dp"   android:layout_below="@+id/listtext"   android:paddingtop="20dp"   android:layout_marginleft="20dp"   android:layout_marginright="60dp"   android:visibility="invisible"   android:id="@+id/lineview"   android:background="@color/linecolor" /> <view    android:layout_width="wrap_content"    android:layout_height="2dp"   android:layout_below="@+id/lineview"   android:paddingtop="20dp"   android:layout_marginleft="20dp"   android:layout_marginright="60dp"   android:background="@color/linecolor" />  <progressbar     android:id="@+id/progressbar"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_alignbottom="@+id/listtext"     android:layout_marginbottom="10dp"     android:layout_alignright="@+id/lineview"     style="?android:attr/android:progressbarstylesmall"     android:visibility="invisible"     android:layout_marginright="10dp" /> 


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -