1

I am trying to create a progress/indicator style bar for a small android application whereby i am able to define the progress of the bar and only that amount is visible/lit up. I would like it in a similar style to the below image but in the vertical direction. I have tried using progress bars and seek bars, however I cannot achieve the desired gradient. Any help on achieving a solution to the below image or for creating the gradient in the progress/seek bars would be very much appreciated!!

Progress Bar

Eoin Clancy
  • 41
  • 1
  • 7
  • see [this](http://stackoverflow.com/a/21060826/2252830), all you need is to implement different colors for each segment – pskink Oct 02 '16 at 04:48

1 Answers1

2

you can use this , and modify based in your case

<?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
    android:angle="90"
    android:startColor="#FF000000"
    android:gradientRadius="@dimen/activity_vertical_margin"
    android:endColor="@android:color/transparent"
    />
</shape>

and in the progress bar add this

        android:background="@drawable/drawable_gradient"

hope this help