How to Customize seekbar in Android

Posted by Sachin Joshi
3
Dec 3, 2015
745 Views
seekbar If you want to customize seekbar in Android then follow the steps mentioned below:- 1) To customize seekbar background create a new xml file in your project's drawable folder .

 seekbar_background.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <shape xmlns:android="http://schemas.android.com/apk/res/android" >
  3. <gradient
  4. android:angle="90"
  5. android:centerColor="#fff"
  6. android:endColor="#fff"
  7. android:startColor="#fff" />

  8. <corners android:radius="2dp" />

  9. <stroke
  10. android:width="2dp"
  11. android:color="#fff" />
  12. <stroke
  13. android:width="2dp"
  14. android:color="#fff" />

  15. </shape>


2) To customize seekbar progress create a new xml file in your project's drawable folder .

 seekbar_progress.xml


  1. <?xml version="1.0" encoding="utf-8"?>

  2. <shape xmlns:android="http://schemas.android.com/apk/res/android" >

  3. <gradient

  4. android:angle="90"

  5. android:centerColor="#7FBD5C"

  6. android:endColor="#7FBD5C"

  7. android:startColor="#7FBD5C" />

  8. <corners android:radius="1dp" />

  9. <stroke

  10. android:width="1dp"

  11. android:color="#fff" />

  12. <stroke

  13. android:width="1dp"

  14. android:color="#fff" />

  15. </shape>


    Read full blog at :How to Customize seekbar in Android

    You can check more informative blogs and tutorials at android development blogs section and can also browse the android developer forum for posting and viewing latest questions on android development.You can check more Open ERP blogs in FindNerd. Apart from this you can also post and view C, PHP, JAVA, HTML, iOS and Android questions and answers at FindNerd’s community forum.
    Comments
    avatar
    Please sign in to add comment.