Popularity
1.1
Growing
Activity
0.0
Stable
5
8
1

Description

Ready for usage CircleControlView based on gesture detection From Mind Studios

Programming language: Java
License: MIT License
Tags: UI     Android     UI Widget     Java     Views     Custom View     Android-library    

CircleControlView alternatives and similar packages

Based on the "UI Widget" category.
Alternatively, view CircleControlView alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of CircleControlView or a related project?

Add another 'UI Widget' Package

README

TheMindStudios

CircleControlView

Ready for usage CircleControlView based on gesture detection

alt tag alt tag

Features

  • [x] get value based on min, max values and rotation angle
  • [x] get count of full circles (2*PI)
  • [x] get rotation direction (clockwise/counter clockwise)

Usage

  1. Import circlecontrolview module to your project

alt tag

  1. Add following line to your settings.gradle file

        include ':YOUR_APP_PROJECT_NAME', ':circlecontrolview'
    
  2. Add following line to your build.gradle file

        dependencies {
        ...
        compile project(':circlecontrolview')
        }
    
  3. Initialize CircleControlView from code

        final CircleControlView circleControlView = (CircleControlView) findViewById(R.id.radio_cv_fm);
        circleControlView.setOnValueChangedCallback(onValueChangedCallback);
    
        final Drawable pressedBackground = ContextCompat.getDrawable(this, R.drawable.bg_btn_radio_pressed);
        circleControlView.setPressedBackground(pressedBackground);
    
        final Properties properties = CircleControlView.newPropertiesBuilder()
                .minValue(700)
                .value(1000)
                .maxValue(1200)
                .numberOfCircles(2)
                .build();
    
        circleControlView.setProperties(properties);
    
            ...
    
        private CircleControlView.OnValueChangedCallback onValueChangedCallback = new        CircleControlView.OnValueChangedCallback() {
            @Override
            public void onValueChanged(int value) {
                ...
                Process your value here
            }
        };
    
  4. Initialize CircleControlView from XML

        <com.themindstudios.circlecontrolview.widget.CircleControlView
            android:id="@+id/circleview"
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:background="@drawable/PUT_YOUR_BG_RESOURCE_ID_HERE"
            circle:minValue="0"
            circle:currentValue="333"
            circle:maxValue="360"/>
    
      final CircleControlView circleView = (CircleControlView) findViewById(R.id.circleview);
      circleView.setOnValueChangedCallback(onValueChangedCallback);
    
      ...
    
      private CircleControlView.OnValueChangedCallback onValueChangedCallback = new CircleControlView.OnValueChangedCallback() {
    
            @Override
            public void onValueChanged(int value) {
                ...
                Process your value here
            }
        };
    

Examples

You can find examples in APP module

License

CorcleControlView is available under the MIT license. See the LICENSE file for more info.


*Note that all licence references and agreements mentioned in the CircleControlView README section above are relevant to that project's source code only.