Giter VIP home page Giter VIP logo

circularseekbar's Introduction

circularseekbar's People

Contributors

beloso avatar berco avatar devadvance avatar heinrichreimer avatar kubukoz avatar madcoda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circularseekbar's Issues

How to get the secondary progress?

Hi , your class is of great use and it has helped me to create nicer looking music player. I am only stuck at getting the secondary progress on the seekbar. Also , how can I make it go anti - clockwise.

Programmatically setting attributes instead of XML values?

I have 2 circles in the same fragment that need different properties, such as start/end angles, radii, lock, etc, and also need to be dynamically configured at runtime. Is there a way to set the attributes of the circle programmatically instead of in the XML?

Progress step(increment) value

Hello,

Is there any way to set the step value ? I mean if I have values from 0-200 and the step of 25, on stop trackingtouch to get only values multiple of 25 (0, 25, 50, 75...). This is how I temporally implemented on my app :

`circularSeekBar.setOnSeekBarChangeListener(new CircularSeekBar.OnCircularSeekBarChangeListener() {
@OverRide
public void onProgressChanged(CircularSeekBar circularSeekBar, int progress, boolean fromUser) {
selectedAmount = (progress / 25) * 25;
amount.setText(String.valueOf(selectedAmount));
}

        @Override
        public void onStopTrackingTouch(CircularSeekBar seekBar) {
            seekBar.setProgress(selectedAmount);
        }

        @Override
        public void onStartTrackingTouch(CircularSeekBar seekBar) {

        }
    });

`

Selected amount is an int where I keep the current progress of the seekbar and amount is a textview where I show it. With this implementation I get the values smaller or equal ... so if it's a value inside 25-49 I return 25. It's not the best solution, but it works...

Thanks !

setProgress() doesn't work

When set progress dynamically in Java Class ,its doesn't change progress and progress color as well.
we need to set grammatically but in Xml its working good...

Disable user to make changes

Is it possible to disable user to make some changes? For example, after user reach certain level I would like to remove option to make other changes. I tried to set clickable to false, but that did not changed nothing. Also I tried using method setEnabled(false), but without success.

Smoothing the Progress update Animation

is there any way by which i could smooth the progress change ?

The scenario i'm trying to implement is that i want to update the progress for 15 seconds while keeping the Maximum value of Progress bar to 100..

Can you please help me in this Regards?

Specifying attributes shows XML Parsing Error

I am able to use the Circular Seek Bar (Thanks!) and able to get progress. I am just getting errors in the XML when I add the additional styling information.

For the "circularSeekBar1" - the error is as follows: "error: Error parsing XML: unbound prefix"
Screenshot of error: http://postimg.org/image/cbge0oh4d/

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:orientation="vertical" >


<com.neil.mytestbed.ui.CircularSeekBar
    android:id="@+id/circularSeekBar1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    app:circle_x_radius="100"

    />

<TextView
    android:id="@+id/tv_circularSeekBarProgress"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/circularSeekBar1"
    android:layout_alignParentRight="true"
    android:layout_marginBottom="150dp"
    android:layout_marginRight="34dp"
    android:ems="10"
    android:inputType="textPostalAddress"
    android:text="asdasd" />            
</RelativeLayout>

ArcSeekBar

How To create arcseekbar with this view? Anyone know .. pls help me.

Can we make circular_x_radius to occupy the mobile/tablet width

Hi , I am trying to make this circularseekbar to occupy the entire screen width of a mobile/tablet. Is there any method or way to do achieve this. I am only unable to set app:circle_x_radius="100" which is a numerical value. is there anyway to set app:circle_x_radius="wrap_content"

elliptic arc but component canvas is square

Hi,

Thanks for the great component. I have a small problem and mayby i dont understand something.

I would like to put two elliptic arc seekBar one below another. Problem is that the component canvas is always square (even if seekbar is not a perfect circle) so there is a big margin between these two component. Is there a way to deal with that?

Align to top instead of centering

Is there the option to align the CircularSeekBar to top instead of centering in available space?
In my case I need a SeekBar formed like an arc.

Sometimes progress value is jumped from 0 to 100.

The current thumb is at value of 0. When changing the seek bar speedy, the value jumps to 100. I suspect the following code block.

else if (lockAtEnd && lockEnabled) {
mProgress = mMax; // Suspected here.
recalculateAll();
invalidate();
if (mOnCircularSeekBarChangeListener != null) {
mOnCircularSeekBarChangeListener.onProgressChanged(this, mProgress, true);
}
}

Error infalting class

Am using android studio
and i have added the auto-res namespace
but i get the error inflating class in the binary xml

solution

restrict user to move pointer

@devadvance
Hi,
I want to restrict user to touch or move pointer at specific progress.
For ex,if i reach 15 of progress then user will not move to the pointer in after 15.it will be move before 15.
is it possible?i have tried so much but can't getting output as i expected.
If any solution then please send me on my id [email protected]

Guide me with the implementation of any of the methods.

I tried this:

@OverRide
public void onProgressChanged(CircularSeekBar circularSeekBar,
int progress, boolean fromUser) {
Log.v("test", "yup");
Toast.makeText(getApplication(), "ended at", Toast.LENGTH_SHORT).show();
}

@Override
public void onStartTrackingTouch(CircularSeekBar circularSeekBar) {
    // TODO Auto-generated method stub
    Log.v("test", "start");
}

@Override
public void onStopTrackingTouch(CircularSeekBar circularSeekBar) {
    // TODO Auto-generated method stub
    Log.v("test", "stop");
}

LogCat shows the texts successfully in all the three methods. But if any Task is given, to show a Toast or to change a string in TextView...for example here a Toast, it says:

"02-07 06:30:30.272: E/AndroidRuntime(5866): FATAL EXCEPTION: main
02-07 06:30:30.272: E/AndroidRuntime(5866): Process: com.ui.yogeshblogspot, PID: 5866
02-07 06:30:30.272: E/AndroidRuntime(5866): java.lang.NullPointerException
02-07 06:30:30.272: E/AndroidRuntime(5866): at android.widget.Toast.(Toast.java:93)
02-07 06:30:30.272: E/AndroidRuntime(5866): at android.widget.Toast.makeText(Toast.java:241)
02-07 06:30:30.272: E/AndroidRuntime(5866): at com.ui.yogeshblogspot.CustomSeekBarExActivity.onProgressChanged(CustomSeekBarExActivity.java:76)
02-07 06:30:30.272: E/AndroidRuntime(5866): at com.devadvance.circularseekbar.CircularSeekBar.onTouchEvent(CircularSeekBar.java:699)
02-07 06:30:30.272: E/AndroidRuntime(5866): at android.view.View.dispatchTouchEvent(View.java:7690)
02-07 06:30:30.272: E/AndroidRuntime(5866): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
"

Shows a problem here in 'circularseekbar.java' on 'LINE 683'

if (mOnCircularSeekBarChangeListener != null) {
here>>>> mOnCircularSeekBarChangeListener.onProgressChanged(this, mProgress, true);
}

not letting me do anything on events. Please let me know
Thanks.

Animation

How Can I animate the progress programmatically

How to implement??

The instructions you put in the readme aren't working for me.

Specifically, in the CircularSeekBar.java, the line, "package com.devadvance.circularseekbar;" gives me the error "package does not correspond to the file path (my project path)..."

and this " xmlns:app="http://schemas.android.com/apk/res/com.devadvance.circulartest"" in the xml isn't working either.

What am I doing wrong?

Also in CircularSeekBar.java, the word "boolean" is red, says "cannot resolve value"
/**
* Set whether the pointer locks at zero and max or not.
* @param boolean value. True if the pointer should lock at zero and max, false if it should not.
*/

Trying to achieve SemiCircular progressBar

Hi, am trying to achieve semi/half circular progressbar using circularseekbar, as it is mentioned i changed start_angle to 0 and end_angle to 180. when i build, it shows error saying "No resource identifier found for attribute start_angle and end_angle". I have included my resource package inside circularseekbar class file. what did i miss? please help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.