I am trying to make a layout which should look like this.
I am using TriggerTrap/SeekArc from github. Here is my xml.
<!--
The MIT License (MIT)
Copyright (c) 2013 Triggertrap Ltd
Author Neil Davies
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:seekarc="http://schemas.android.com/apk/res/com.triggertrap.sample"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@android:color/black"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<com.triggertrap.seekarc.SeekArc
android:id="@+id/seekArc"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_gravity="center"
android:padding="20dp"
seekarc:arcColor="#808080"
seekarc:clockwise="true"
seekarc:max="500"
seekarc:progressColor="@android:color/white"
seekarc:rotation="180"
seekarc:startAngle="95"
seekarc:sweepAngle="170"
seekarc:thumb="@drawable/custom_seek_arc_control_selector"
seekarc:touchInside="false" />
<Button
android:id="@+id/btn"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_gravity="center"
android:background="@drawable/scrubber_pressed"/>
<com.triggertrap.seekarc.SeekArc
android:id="@+id/seekArc2"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_gravity="center"
android:padding="20dp"
seekarc:arcColor="#808080"
seekarc:clockwise="true"
seekarc:max="500"
seekarc:progressColor="@android:color/white"
seekarc:rotation="180"
seekarc:startAngle="275"
seekarc:sweepAngle="170"
seekarc:thumb="@drawable/custom_seek_arc_control_selector"
seekarc:touchInside="false" />
</LinearLayout>
Now, the problem is, since I am using frame layout, the top seekarc as well as button is non responsive to touches. Only the bottom seekarc is touchable. Also, that seekarc is moving only 90 degrees, as shown in the first image. If I change the seekarc to linear layout, the whole layout gets distorted like this.
Now everything is clickable but the design is finished. Can anyone please tell me how to make it work such that the button as well as both seekarc are touchable and also the design remains unaffected. And also the bottom seekbar moves whole lenght and not just half.
I also have the same issue. Have you found any workaround? Please guide me.
ReplyDelete