├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── colors.xml │ │ │ ├── layout │ │ │ │ ├── activity_sample.xml │ │ │ │ └── fragment_sample.xml │ │ │ └── values-w820dp │ │ │ │ └── dimens.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── jesusm │ │ │ │ └── holocircleseekbar │ │ │ │ └── app │ │ │ │ ├── SampleActivity.java │ │ │ │ └── SampleActivityFragment.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── com │ │ └── jesusm │ │ └── holocircleseekbar │ │ └── app │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── lib ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── attrs.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── jesusm │ │ │ └── holocircleseekbar │ │ │ └── lib │ │ │ └── HoloCircleSeekBar.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── jesus │ │ └── lib │ │ └── ApplicationTest.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── images ├── device-2015-04-08-225534.png └── device-2015-09-21-225940.png ├── AndroidManifest.xml ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── README.md ├── gradlew ├── pom.xml └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':lib', ':app' 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | lib 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /images/device-2015-04-08-225534.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/images/device-2015-04-08-225534.png -------------------------------------------------------------------------------- /images/device-2015-09-21-225940.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/images/device-2015-09-21-225940.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JesusM/HoloCircleSeekBar/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | HoloCircleSeekbar 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /lib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 01 15:45:38 CEST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #00BCD4 4 | #D50000 5 | #607D8B 6 | #BDBDBD 7 | #4CAF50 8 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sample.xml: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /lib/src/androidTest/java/com/example/jesus/lib/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.jesus.lib; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/java/com/jesusm/holocircleseekbar/app/SampleActivity.java: -------------------------------------------------------------------------------- 1 | package com.jesusm.holocircleseekbar.app; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | 6 | 7 | public class SampleActivity extends AppCompatActivity { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_sample); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /app/src/androidTest/java/com/jesusm/holocircleseekbar/app/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.jesusm.holocircleseekbar.app; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /lib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion parent.ext.compileSdkVersion 5 | buildToolsVersion parent.ext.buildToolsVersion 6 | 7 | defaultConfig { 8 | minSdkVersion parent.ext.minSdkVersion 9 | targetSdkVersion parent.ext.targetSdkVersion 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | } 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | build/ 3 | gen/ 4 | 5 | # Local configuration file (sdk path, etc) 6 | local.properties 7 | 8 | # Gradle generated files 9 | .gradle/ 10 | 11 | # User-specific configurations 12 | .idea/libraries/ 13 | .idea/workspace.xml 14 | .idea/tasks.xml 15 | .idea/.name 16 | .idea/compiler.xml 17 | .idea/copyright/profiles_settings.xml 18 | .idea/encodings.xml 19 | .idea/gradle.xml 20 | .idea/misc.xml 21 | .idea/modules.xml 22 | .idea/scopes/scope_settings.xml 23 | *.iml 24 | # OS-specific files 25 | .DS_Store 26 | .DS_Store? 27 | ._* 28 | .Spotlight-V100 29 | .Trashes 30 | ehthumbs.db 31 | Thumbs.db 32 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jesus/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /lib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jesus/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion parent.ext.compileSdkVersion 5 | buildToolsVersion parent.ext.buildToolsVersion 6 | 7 | defaultConfig { 8 | applicationId "com.jesusm.holocircleseekbar.app" 9 | minSdkVersion parent.ext.minSdkVersion 10 | targetSdkVersion parent.ext.targetSdkVersion 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile project(':lib') 24 | compile parent.ext.libraries.appcompat 25 | compile parent.ext.libraries.supportv4 26 | compile parent.ext.libraries.supportv13 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Settings specified in this file will override any Gradle settings 4 | # configured through the IDE. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 10 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 11 | # When configured, Gradle will run in incubating parallel mode. 12 | # This option should only be used with decoupled projects. More details, visit 13 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 14 | #org.gradle.parallel=true 15 | org.gradle.daemon=true 16 | SUPPORT_LIBS_VERSION=23.2.1 17 | BUILD_TOOLS_VERSION=23.0.3 -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Android HoloCircleSeekBar

2 | 3 | A Circle SeekBar inspired by Android Holo ColorPicker designed by Marie Schweiz and developed by Lars Werkman. 4 | 5 | ![image](/images/device-2015-04-08-225534.png) 6 | ![image](/images/device-2015-09-21-225940.png) 7 | 8 |

How to integrate in your proyect

9 | 10 | Import it on your **build.gradle** 11 | 12 | ``` 13 | repositories { 14 | maven { 15 | url "https://jitpack.io" 16 | } 17 | } 18 | 19 | dependencies { 20 | compile 'com.github.JesusM:HoloCircleSeekBar:v2.2.2' 21 | } 22 | ``` 23 | 24 | 25 |

Documentation

26 | To add the widget, you only need to add this to your xml: 27 | 28 | 41 | 42 | Don't forget to add this at the root of your View in the xml layout to use the custom attributes: 43 | 44 | xmlns:app="http://schemas.android.com/apk/res-auto" 45 | 46 | You can change some widget components (text size, wheel color, point color, etc) sith this attrs. 47 | 48 | app:max="100" 49 | app:pointer_color="#0174DF" 50 | app:pointer_halo_color="#88252525" 51 | app:pointer_size="34" 52 | app:text_color="#FF0000" 53 | app:text_size="65" 54 | app:wheel_active_color="#00BFFF" 55 | app:wheel_unactive_color="#FFCCCCCC" 56 | 57 | To get the value of the circle seekbar 58 | 59 | HoloSeekBar picker = (HoloSeekBar) findViewById(R.id.picker); 60 | picker.getValue(); 61 | 62 |

License

63 | 64 | Copyright 2012 Jesús Manzano 65 | 66 | Licensed under the Apache License, Version 2.0 (the "License"); 67 | you may not use this file except in compliance with the License. 68 | You may obtain a copy of the License at 69 | 70 | http://www.apache.org/licenses/LICENSE-2.0 71 | 72 | Unless required by applicable law or agreed to in writing, software 73 | distributed under the License is distributed on an "AS IS" BASIS, 74 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 | See the License for the specific language governing permissions and 76 | limitations under the License. 77 | 78 | 79 |

Original by

80 | **Lars Werkman** 81 | 82 |

Modified By

83 | **Jesús Manzano** 84 | -------------------------------------------------------------------------------- /app/src/main/java/com/jesusm/holocircleseekbar/app/SampleActivityFragment.java: -------------------------------------------------------------------------------- 1 | package com.jesusm.holocircleseekbar.app; 2 | 3 | import android.app.Fragment; 4 | import android.os.Bundle; 5 | import android.text.TextUtils; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.EditText; 10 | 11 | import com.jesusm.holocircleseekbar.lib.HoloCircleSeekBar; 12 | 13 | public class SampleActivityFragment extends Fragment { 14 | 15 | private HoloCircleSeekBar seekBar; 16 | private EditText maxValue; 17 | private EditText value; 18 | 19 | public SampleActivityFragment() { 20 | } 21 | 22 | @Override 23 | public View onCreateView(LayoutInflater inflater, ViewGroup container, 24 | Bundle savedInstanceState) { 25 | View rootView = inflater.inflate(R.layout.fragment_sample, container, false); 26 | seekBar = (HoloCircleSeekBar) rootView.findViewById(R.id.picker); 27 | maxValue = (EditText) rootView.findViewById(R.id.change_max_value); 28 | maxValue.setText(String.valueOf(seekBar.getMaxValue())); 29 | value = (EditText) rootView.findViewById(R.id.change_value); 30 | value.setText(String.valueOf(seekBar.getValue())); 31 | rootView.findViewById(R.id.change_max_button).setOnClickListener(new View.OnClickListener() { 32 | @Override 33 | public void onClick(View v) { 34 | String newValue = maxValue.getText().toString(); 35 | if (!TextUtils.isEmpty(newValue)) { 36 | seekBar.setMax(Integer.valueOf(newValue)); 37 | } 38 | } 39 | }); 40 | rootView.findViewById(R.id.change_value_button).setOnClickListener(new View.OnClickListener() { 41 | @Override 42 | public void onClick(View v) { 43 | String newValue = value.getText().toString(); 44 | if (!TextUtils.isEmpty(newValue)) { 45 | seekBar.setValue(Integer.valueOf(newValue)); 46 | } 47 | } 48 | }); 49 | seekBar.setOnSeekBarChangeListener(new HoloCircleSeekBar.OnCircleSeekBarChangeListener() { 50 | @Override 51 | public void onStartTrackingTouch(HoloCircleSeekBar seekBar) { 52 | // Nothing to do 53 | } 54 | 55 | @Override 56 | public void onStopTrackingTouch(HoloCircleSeekBar seekBar) { 57 | // Nothing to do 58 | } 59 | 60 | @Override 61 | public void onProgressChanged(HoloCircleSeekBar seekBar, int progress, boolean fromUser) { 62 | value.setText(String.valueOf(progress)); 63 | } 64 | }); 65 | return rootView; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_sample.xml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 25 | 26 | 31 | 32 | 35 | 36 | 43 | 44 |