-1

Radial SeekBar

Please help me to how to draw a Radial SeekBar, Plaese check the image url that is actual design of seek bar. I tried many ways but not worked out properly.

I tried like this

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
tools:context="com.scanner.com.protracterview.MainActivity">

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="0"
    android:id="@+id/number"
    android:textSize="18sp"
    android:layout_marginBottom="30dp"
    android:gravity="center"/>

<com.goodiebag.protractorview.ProtractorView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:arcColor="#91d8f7"
    app:arcProgressColor="#91d8f7"
    app:tickColor="#4a4a4a"
    app:indicatorType="line"
    app:tickProgressColor="#abe6"
    app:textColor="#000"
    app:textProgressColor="#FF0000"
    app:angleTextSize="0dp"
    app:arcWidth="2dp"
    app:progressWidth="2dp"
    app:tickOffset="18dp"
    app:tickLength="0dp"
    app:angle="15"
    android:id="@+id/protrat"
    app:tickIntervals="15"
    app:ticksBetweenLabel="three"
    app:touchInside="true"
    app:roundEdges="true"
    android:layout_below="@+id/number"
    android:layout_alignParentEnd="true" />

  • 2
    Please edit your question to provide a [mcve] demonstrating what you tried and what "not worked out properly" means. For example, I found [this implementation](https://github.com/GoodieBag/ProtractorView) in about two minutes, searching on [the Android Arsenal](https://android-arsenal.com). Perhaps you could just use it, or learn how they did it to implement your own. – CommonsWare Jun 05 '17 at 10:57

1 Answers1

1

enter image description here

If you want something like this - Follow this - (Matt Joseph)

  1. There is a class CircularSeekBar.java paste it in your project
  2. attrs.xml (in res/values/attrs.xml)
  3. and your xml file should be like this,

    <mrbrown.arcseekbar.CircularSeekBar
        android:id="@+id/circularSeekBar1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:start_angle="180"
        app:end_angle="0"
        app:circle_x_radius="500dp"
        app:circle_y_radius="500dp"
        app:use_custom_radii="true"
        app:progress="0"
        app:max="100"
        app:pointer_alpha_ontouch="100"
        app:pointer_color="#0174DF"
        app:pointer_halo_color="#880174DF"/>
    

Arnold Brown
  • 1,330
  • 13
  • 28