neild001 / SeekArc

Circular SeekBar view for Android
MIT License
892 stars 296 forks source link

2 Arcs in an Acticity #24

Open khushank opened 9 years ago

khushank commented 9 years ago

Hi , Thanks a lot for this wonder full work. I was understanding your seek Arc Library and tried to make 2 Seek Arcs facing each other in an Activity . One Clockwise and other anticlockwise with following code in xml <com.triggertrap.seekarc.SeekArc android:id="@+id/circularSeekBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" android:padding="30dp" app:arcColor="#000000" app:clockwise="true" app:progressColor="#FF6600" app:rotation="180" app:startAngle="0" app:sweepAngle="360" app:thumb="@drawable/mobile_portrait_l" />

    <com.triggertrap.seekarc.SeekArc
        android:id="@+id/circularSeekBar1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:padding="30dp"
        app:arcColor="@android:color/holo_red_dark"
        app:clockwise="false"
        app:progressColor="#FF6600"
        app:rotation="180"
        app:startAngle="0"
        app:sweepAngle="360"
        app:thumb="@drawable/rotated_r_large" />

Now since they have a common centre and by using them in a frame layout the circles coincides. But when i try to seek the the left circle i am not able to do so. After debugging i found that when i try to seek left circle it calculates the progress angle of the right (anti clockwise) circle and thus gives the wrong progress angle. This happens even if i take the 2 arcs facing each other.

Please provide a solution for this.

scottyab commented 8 years ago

Hey @khushank I'm not clear on your issue around the , maybe you could create a more complete code sample with the activity code too. Maybe you could adapt one of the sample app's activities?