0

can someone pls guide me what should i need to add in code to draw vertical lines of fixed height i want vertical lines like a scale measurement in this url see vertical line example Here is my code TRIED CODE

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    >
<LinearLayout 
   android:id="@+id/linear_layout_one"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:orientation="horizontal"
   android:layout_marginLeft="5dp">


       <View
android:layout_width="5dip"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/darker_gray"/>
   <View
android:layout_width="5dip"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>
   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/darker_gray"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>

   <View
android:layout_width="5dip"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:rotation="90"
android:background="@android:color/holo_purple"/>


</LinearLayout>
</ScrollView>
Erum
  • 790
  • 3
  • 14
  • 36
  • Under this link I found document with pretty nice UI for BMI API. But still I don't understand what do you mean. You would like to divide those views with this line or what? – Krzysztof Skrzynecki Aug 05 '14 at 19:23
  • yes i would like to divide those views with this line but i dnt think it will be appropriate .can u suggest me anyother way for its UI. – Erum Aug 06 '14 at 05:18

1 Answers1

0

You can apply different styles using drawable resource See something like this Add shadow to custom shape on Android

Community
  • 1
  • 1
bond
  • 11,236
  • 7
  • 48
  • 62