[android-developers] Re: Move vertical Seekbar thumb to the progress drawable height?

2018-02-28 Thread Hiren Patel
Hi Nikola,

I have tried your solution but still facing same issue, so if you can post 
your code here then we can get help from same.

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/0cc7e405-8dbd-4227-89b7-4748b17fe09a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Move vertical Seekbar thumb to the progress drawable height?

2016-10-01 Thread Eoin Clancy
Hey Nikola,
Im facing this same issue now!
You wouldn't still have the code available would you?
I tried implementing your solution but im still left with the same result

Thanks.

On Tuesday, October 11, 2011 at 5:07:43 PM UTC+1, NikolaMKD wrote:
>
> I have vertical seekbar. 
>
> In the class which extends Seekbar I have on touch listener 
>  @Override 
> public boolean onTouchEvent(MotionEvent event) { 
> if (!isEnabled()) { 
> return false; 
> } 
>
> switch (event.getAction()) { 
> case MotionEvent.ACTION_DOWN: 
> case MotionEvent.ACTION_MOVE: 
> case MotionEvent.ACTION_UP: 
> setProgress(getMax() - (int) (getMax() * 
> event.getY() / getHeight())); 
> onSizeChanged(getWidth(), getHeight() , 0, 0); 
> break; 
>
> case MotionEvent.ACTION_CANCEL: 
> break; 
> } 
> return true; 
> } 
>
>
> When I setProgress(value) expected output is the progress bar to 
> change, in my case only yellow surface moves to regular value but the 
> thumb does not. 
>
> I tried to make it move after setting progress to 
>  setProgress(getMax() - (int) (getMax() * progressDrawableHeight / 
> getHeight())); 
> onSizeChanged(getWidth(), getHeight() , 0, 0); 
> which logically means that the thumb should be moved to progress 
> drawable height (the edge of the yellow surface) 
>
> Any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/aa36db35-3eae-408d-858c-9390315d964a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Re: Move vertical Seekbar thumb to the progress drawable height?

2011-10-11 Thread NikolaMKD
It's ok. I solved it myself.

I just created method that will call setProgress(getMax() - (getMax()
- progress)) inside my custom class that extended Seekbar. Cheers

On Oct 11, 6:07 pm, NikolaMKD  wrote:
> I have vertical seekbar.
>
> In the class which extends Seekbar I have on touch listener
>  @Override
>             public boolean onTouchEvent(MotionEvent event) {
>                 if (!isEnabled()) {
>                     return false;
>                 }
>
>                 switch (event.getAction()) {
>                     case MotionEvent.ACTION_DOWN:
>                     case MotionEvent.ACTION_MOVE:
>                     case MotionEvent.ACTION_UP:
>                         setProgress(getMax() - (int) (getMax() *
> event.getY() / getHeight()));
>                         onSizeChanged(getWidth(), getHeight() , 0, 0);
>                         break;
>
>                     case MotionEvent.ACTION_CANCEL:
>                         break;
>                 }
>                 return true;
>             }
>
> When I setProgress(value) expected output is the progress bar to
> change, in my case only yellow surface moves to regular value but the
> thumb does not.
>
> I tried to make it move after setting progress to
>  setProgress(getMax() - (int) (getMax() * progressDrawableHeight /
> getHeight()));
>                         onSizeChanged(getWidth(), getHeight() , 0, 0);
> which logically means that the thumb should be moved to progress
> drawable height (the edge of the yellow surface)
>
> Any ideas?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en