Closed xxwn446 closed 6 years ago
who can help me?thanks very much
@xxwn446 Not an efficient solution but this is what I'm doing.
Get the x coordinates of the thumbnail Rect with;
crystalSeekBar.getLeftThumbRect().left;
This value will allow you to align the Left coordinates of your TextView with the Left coordinates of the bounds of the thumb.
TextView.setX(crystalSeekBar.getLeftThumbRect().left));
thank you very much!!!
------------------ 原始邮件 ------------------ 发件人: "Pól Ó Riain";notifications@github.com; 发送时间: 2017年8月9日(星期三) 下午4:30 收件人: "syedowaisali/crystal-range-seekbar"crystal-range-seekbar@noreply.github.com; 抄送: "___陌 离"1003860152@qq.com; "Mention"mention@noreply.github.com; 主题: Re: [syedowaisali/crystal-range-seekbar] how can i make the textviewmove with the thumb? (#61)
@xxwn446 Not an efficient solution but this is what I'm doing.
Get the x coordinates of the thumbnail Rect with;
crystalSeekBar.getLeftThumbRect().left;
This value will allow you to align the Left coordinates of your TextView with the Left coordinates of the bounds of the thumb.
TextView.setX(crystalSeekBar.getLeftThumbRect().left));
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@daesu Didn't work for me. My crystalSeekBar
object doesn't have getLeftThumbRect
method.
@lucasharada It's a method I am seeing in crystalSeekBar.java. You can see it here ; https://github.com/syedowaisali/crystal-range-seekbar/blob/master/crystalrangeseekbar/src/main/java/com/crystal/crystalrangeseekbar/widgets/CrystalSeekbar.java on L287
@daesu Weird. I'm getting this error:
Error:(130, 33) error: getLeftThumbRect() has protected access in CrystalRangeSeekbar
I'm using the latest version available (v 1.1.3) as included below:
compile 'com.crystal:crystalrangeseekbar:1.1.3'
@lucasharada You are looking at the CrystalRangeSeekbar.java file, not CrystalSeekbar.java.
The CrystalRangeSeekbar is for selecting a range of values, the CrystalSeekbar only has one thumb. In CrystalRangeSeekbar the getLeftThumbRect() method is protected but in CrystalSeekbar the getLeftThumbRect() method is public.
@daesu Oh, I get it. This won't work for me, but thanks anyway!
i want to know how can i make the textview move with the thumb