0

Hey I am making an official purpose app which conclude business transaction.

I want a Bar or SeekBar view which shows Income or Expense of company like this

  • Red for if expense Exceeds
  • Green for if Income Gained

enter image description here

Hopefully We have this type of customview in many apps.

Please Help me out with this..!!

Venkatesh S
  • 5,466
  • 1
  • 25
  • 30
Parth Sharma
  • 359
  • 1
  • 4
  • 21

2 Answers2

1

You can acheive what you want by using this light weight library. The good part about this is that you can easily customize it according to your requirement.

enter image description here

All you have to do is three xml files... Check this out....

Hope this helps.

amalBit
  • 12,041
  • 6
  • 77
  • 94
0

progress_bar.xml

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >

    <item android:id="@android:id/background">
        <shape>
            <solid android:color="#FF0000" />
        </shape>
    </item>
    <item android:id="@android:id/progress">
        <clip>
            <shape>
                <solid android:color="#00FF00" />
            </shape>
        </clip>
    </item>
</layer-list>

Code:

 SeekBar mSeekBar = (SeekBar) findViewById(R.id.seekBar1);
    mSeekBar.setProgressDrawable(getResources().getDrawable(R.drawable.progress_bar));
Community
  • 1
  • 1
Shashika
  • 1,151
  • 1
  • 9
  • 21