crystal-range-seekbar's People
Forkers
ps-jimmy naseemakhtar994 dilippaudyal neil-orzzh wuyi166 ranjan101 aleksandr1592 gitandroiddevapm suntzu1776 kataloo artzmb quangxox rasoul-ghadiri thanhit93 lxykad dannyrz mihir01 haibui-parkman ahmedalkhashab huangpeicong wxl2578163 millytwm1228 hhoang imufun guardyang warrengees tiwari9773 bstanga rohitshampur shadowq5 hydejiaqi olidroide ringyee dhiralkaniya chapp-hk sichuanyl irinnovative hyeoncheolseo smaguluri sokolluk ricardobravoa wizardskill jitesh1720 frozmen white1208 ifahad94 peperzaken luksha zhouzhixue ishandutta2007 ndacosta matrixxun daupawar rakesh1988 mesropd fashioncj paijwar mhd-dll liaox zoltanbalint afrussel theanalyzer matrixy manojmadanmohan prashant31191 alexebe mxl talhahasanzia mattstanford rushabh13 pcevikogullari boomesh ffdez quanlt androiddevelopermct mesadhan tokenbuild abhilashgurudeva luongvo hitendesai3434 rradmir roelvandun mahmoudaymann khunchheang gongcheng3130 keehoo codevate derlio arnav017 jemshit jey1992 themavencoder berkaypolat michaelpankraz radudorin jofrb zhiqiang115 prashanthlkv kurloo bigdotsoftwarecrystal-range-seekbar's Issues
setMinStartValue and setMaxStartValue do not work properly for CrystalRangeSeekbar (new problem!)
Hi!
1.1.3
If I set the minValue near the maxValue(end bar) - I get minValue and maxValue at the start bar, instead minValue and maxValue at the end bar.
Thanks
NullPointerException at using Bitmaps in thumbs
Have a code
Bitmap b = Bitmap.createBitmap(30, 30, Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(b);
Paint p = new Paint();
p.setColor(getResources().getColor(R.color.accent));
c.drawCircle(15, 15, 15, p);
bar.setLeftThumbBitmap(b);
bar.setRightThumbBitmap(b);
bar.apply();
And after try to move thumbs immediatly get exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1269)
at android.graphics.Canvas.drawBitmap(Canvas.java:1325)
at com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar.drawRightThumbWithImage(CrystalRangeSeekbar.java:653)
at com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar.setupRightThumb(CrystalRangeSeekbar.java:641)
at com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar.onDraw(CrystalRangeSeekbar.java:899)
at android.view.View.draw(View.java:16178)
at android.view.View.updateDisplayListIfDirty(View.java:15174)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15134)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
So I cant use custom bitmaps to thumbs (but I simply want to replace so huge f*cking thumbs, why do you not implement size changing?!, argh...).
Setting min & max start value
When I set both the min and max start values it sets both thumbs to the lowest values that I've defined in setMaxValue() and setMinValue(). However when I set only the min start value or max start value using setMinStartValue() or setMaxStartValue() it works as expected.
How set initial value to craystal seekbar from code ?
How set initial value to craystal seekbar from code ?
Drawable xml and bar thickness
Hello!
Thanks for great job!
Is it possible to add drawable xml for thumb and bar thickness?
With it possibility it'll my favourite range bar ;)
Horrible Image Setter for Tickers.
Range Bar make difference like digital watch
How to set default value or set thumb to the specific value
I want to set the thumb to the last saved value is that possible?
thumb_image from GradientDrawable
Hi!
please add possibility to set GradientDrawable to thumb_image.
for example it is much easier to me draw thumbs as shape drawables, than draw images via gimp
exponential growth
is it possible to get a non-linear way of increasing values when sliding seekbar: something like explained here: https://plus.google.com/+SanchoVir%C3%A1gAttila/posts/NPe8WtAkMgp...?
setMinStartValue and setMaxStartValue do not work properly for CrystalRangeSeekbar
I've seen this issue more than a few times, but I thought I would share my experience with it. It really doesn't seem like this methods work correctly at all, or at least the setMaxStartValue method doesn't work at all.
rsb.setMinStartValue(valOne).apply(); rsb.setMaxStartValue(valTwo).apply();
sets both cursors to min value (0, or whatever that is);
rsb.setMinStartValue(valOne).setMaxStartValue(valTwo).apply();
sets both cursors to valOne
rsb.setMaxStartValue(valTwo).setMinStartValue(valOne).apply();
sets both cursors to valOne
rsb.setMaxStartValue(valOne).setMinStartValue(valTwo).apply();
sets both cursors to valTwo
Thumb size
Hi! Is there a way for changing the thumb size? I want it more small but layout_height dont work :/
Ty
cry
how set left and right seekbar progress ? i didn't find this method.
How to set size of the draggable circle
Hello, my seekbar is pretty small and the draggable circle is too big. I see no attributes to change the radius. Can it be done?
Thanks.
More control over steps?
Hi,
Is it possible to explicitly set the Steps?
I am doing an age range using your CrystalRangeSeekbar. My min is 18, max 100. I'd like the steps to be;
18, 20, 25, 30....[then in 5s]...95, 100.
Thanks a lot!
setMaxStartValue and setMinStartValue not working programmatically
Trying to set minStartValue and maxStartValue programmatically get them set to min and max values.
rangeSeekBar .setMinStartValue(ageMin) .setMaxStartValue(ageMax) .apply();
Feature request: auto-attract
How to get current progress
Hi. I really need to know what is the current value outside the Listener.
from some reason seekbar.getProgress isnt exist.
tyyy
set limit to left and right sides
how can I set minimum value and maximum values for the start and the end of the bar, and without being able to over do it, to be fixed, something similar to the gap, but in the start and the end
Seekbar gap
Seekbar doesn't keep it's gap when min and max values set programmatically. But when I set min, max values in xml it's working
how to apply onStopTrackingTouch() in crystal range seekbar?
I need to track the final value of the range seekbar after user takes a finger out of the range bar. Normal seekbars have onStopTrackingTouch mode for it, but how do i do it using crystal range seekbar?
How to set setProgress for Min and Max value in progress bar?
I am using seekbar with two side thumb. I am changing min and max value and viewing result in another activity. Once I returned to that seekbar activity I want to show the last selected min and max value in seekbar. How can I achieve this one? I unable to find setProgress method for Min and Max value respectively.
Bug found in: CrystalRangeSeekbar.setMinStartValue(float)
When the range is smaller than 100, it went wrong.
Here is the reson:
when update the maxStartValue in method apply(),
// set max start value
if (maxStartValue <= minStartValue || maxStartValue <= minValue) {
maxStartValue = 0;
setNormalizedMaxValue(maxStartValue);
}
else if(maxStartValue >= maxValue){
maxStartValue = maxValue;
setMaxStartValue();
}
else{
setMaxStartValue();
}
minStartValue is not the value that set before any more. so it goes to the wrong condition.
You can reproduce the issue by:
rangeSeekbar.setMinValue(2).setMaxValue(17).setMinStartValue(4).setMaxStartValue(8).apply();
Negative numbers crash
I have crash if my maxValue set -15 and min value set to -78.Seekbar step is 0.1.Please tell me if my fix is working.
#28 pull request.
setminStartValue not working properly
If I'm trying to use setMinStartValue(1735f).apply();
then seekbar is pointing at position 17.
Its not taking start thumb to exact that point.
Please fix this issue.
how can i make the textview move with the thumb?
i want to know how can i make the textview move with the thumb
where is the method ? crySeekBar.setCurrentPosition( ) ?
where is the method ? crySeekBar.setCurrentPosition( ) ? i want a method to set the seekbar current position . fix your class please .
I try to set shape drawable - and ap crashed!
app:left_thumb_image="@drawable/tmp"
/drawable/tmp.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid android:color="#bada55"/> <size android:width="20dp" android:height="20dp"/> </shape>
How i can set shape drawable and vector drawable to the thumb?
How to set current progress in thumb?
How to set progress value in thumb on seekbar changes?
how to reset min and max values in crystal seekbar
hello, how can i reset the min value and max value in seekbar, i tried
.setValue, but is there any other way..?
corner_radius is using a float format instead of dimension
Would be nice if corner_radius would take a dp value rather than a float value.
I could submit a PR for this change, but it could break backwards compatibility?
If this is something you'd want a PR for, let me know? Otherwise feel free to close this issue.
Thanks!
Change bar value programatically
How to change bar value programatically.. ?
Cant find the setValue method..
all i find just setMinValue, setMinStartValue & setMaxStartValue...
CrystalRangeSeekbar not showing when surrounded by TextViews
When I use CrystalRangeSeekbar using the entire width, it shows normally. But when I try to place 2 TextViews on the left and right of the Seekbar, the Seekbar doesn't show. See code below to replicate:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/txt_min"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:text="MIN" />
<com.crystal.crystalrangeseekbar.widgets.CrystalRangeSeekbar
android:id="@+id/temperature_rangeseekbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/txt_max"
android:layout_toLeftOf="@+id/txt_min"
android:layout_toRightOf="@+id/txt_max"
android:layout_toStartOf="@+id/txt_min"
app:bar_color="#000"
app:bar_highlight_color="#2434AD"
app:data_type="_float"
app:left_thumb_color="#3caf9a"
app:left_thumb_color_pressed="#349986"
app:max_value="42.0"
app:min_value="35.0"
app:right_thumb_color="#c44949"
app:right_thumb_color_pressed="#b43a3a" />
<TextView
android:id="@+id/txt_max"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:text="MÁX" />
</RelativeLayout>
IllegalArgumentException: Number class 'java.lang.Double' is not supported
` volumeSeekbar.setOnSeekbarChangeListener(new OnSeekbarChangeListener() {
@OverRide
public void valueChanged(Number value) {
int volume = value.intValue();
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC,
(int) volume, 0);
}
});
`
Caused by: java.lang.IllegalArgumentException: Number class 'java.lang.Double' is not supported at com.crystal.crystalrangeseekbar.widgets.CrystalSeekbar.formatValue(CrystalSeekbar.java:712) at com.crystal.crystalrangeseekbar.widgets.CrystalSeekbar.getSelectedMinValue(CrystalSeekbar.java:369) at com.crystal.crystalrangeseekbar.widgets.CrystalSeekbar.setOnSeekbarChangeListener(CrystalSeekbar.java:269)
How to change left and right bar_color ?
how to edit proguard
how can i edit the proguard file,[]( ̄▽ ̄)*
Transparent background
Hi!
How can I set transparent background?
Thanks
Add method for set thumbs radius
Default size of thumbs is too big (comparing with native elements). But I do not found method for changing radius and forced to override CrystalRangeSeekbar
:
public class PatchedCrystalRangeSeekbar extends CrystalRangeSeekbar {
private final int mThumbsSize = 30;
// ... override constructors
@Override
protected float getThumbWidth() {
return mThumbsSize;
}
@Override
protected float getThumbHeight() {
return mThumbsSize;
}
}
It will be great to create method or style for changing default radius.
Click on seekbar to change value without using thumb
Hi,
Many people start using a seekbar without using the thumb, they just click anywhere on the seekbar then move the thumb if necessary.
Currently nothing happens when I click on my crystal seekbar. Is it possible to activate the clicks on the seekbar ?
Start Values
Hi, if I set CrystalRangeSeekbar like this:
CrystalRangeSeekbar seekbar = new CrystalRangeSeekbar(this);
seekbar .setDataType(CrystalRangeSeekbar.DataType.FLOAT)
.setMinValue(5f)
.setMaxValue(30f)
.setSteps(0.5f)
.setMinStartValue(18.5f)
.setMaxStartValue(23.0f);
it gives me maxStartValue equal to minStartValue, so min and max start values are both 18.5 at the end.
layout_width="wrap_content" not honored
I've 2 TextView, one before and one after the bar, the all is in a LinearLayout.
The bar is always covering the width until the end of the screen, the second TextView is never visible.
Workaround:
Depending of your layout strategy, you could achieve something by playing with the weight
android:layout_width="0dp"
android:layout_weight="1"
Vector drawable support
Set thumb to a vector drawable, seekbar disappeared.
Should be a feature or a bug?
Unable to specify thumb drawable
Creating a BitmapDrawable and assigning it to a thumb via setLeftThumbDrawable() appears to have no effect. Changing the color programmatically works, but the thumb uses the default dimension and drawable.
Last version
Please update latest version here
compile 'com.crystal:crystalrangeseekbar:1.1.1'
Thumb image getting clipped
When I press the thumb, the image getting clipped, where can we change the seekbar height area?
Show button when seekbar is released - onStopTrackingTouch ?
Hi,
I need to show a button and a textview when the seekbar is released by the user. I guess I should override the onStopTrackingTouch with a normal seekbar.
It seems that I cannot do it with the crystal-range-seekbar. So what should I do ?
Thank you,
Some lag in the view while seekbar change happen
Hi,
Recently implement the crystal-range-seekbar in my project inside dialog.
Now everything work fine until we move the left or right icon in order to change the value of min and max.
During the seekbar min and max change operation the seek is not smooth and some lag while moving left or right end of the seekbar.
Providing the code snippet for seekbar config
pricerangebar.setCornerRadius(10f)
.setBarColor(Color.parseColor("#93F9B5"))
.setBarHighlightColor(Color.parseColor("#16E059"))
.setMinValue(0)
.setMaxValue(10000)
.setSteps(100)
.setLeftThumbDrawable(R.mipmap.dicrease)
.setLeftThumbHighlightDrawable(R.mipmap.dicrease)
.setRightThumbDrawable(R.mipmap.increase)
.setRightThumbHighlightDrawable(R.mipmap.increase)
.setDataType(CrystalRangeSeekbar.DataType.INTEGER)
.apply();
pricerangebar.setOnRangeSeekbarChangeListener(new OnRangeSeekbarChangeListener() {
@SuppressLint("SetTextI18n")
@OverRide
public void valueChanged(Number minValue, Number maxValue) {
minproductPrice=minValue.toString();
maxproductPrice=maxValue.toString();
txt_priceminvalue.setText("From "+minValue);
txt_pricemaxvalue.setText("To "+maxValue);
}
});
Is there any more configuration or setting available with seekbar to make it smooth scroll on both left and right end
Please provide some guideline or help to resolve this problem.
padding not honored
When using a padding on CrystalRangeSeekbar, it's not honored and the visual doesn't change.
Change bar size
Hi ty for this library.
I have some issues but most important is that I can't change the bar or the thumb of the seekbar.
setScrollBarSize not working and all the other options that are relevant.
Please tell me how can I change the size tyyy
CrystalRangeSeekbar
Through setGap () method is set up, have no effect Bug and there are many
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.