Clover Coverage Report - AnCal Coverage Report
Coverage timestamp: gio dic 18 2014 12:18:42 EST
../../../../img/srcFileCovDistChart9.png 40% of files have more coverage
311   690   98   8,64
118   558   0,32   12
36     2,72  
3    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  TimeWidgetSlider       Line # 12 285 88 83,5% 0.8345154
  TimeWidgetSlider.OnTimeChange       Line # 15 0 0 - -1.0
  TimeWidgetSlider.ValueBox       Line # 21 26 10 76,2% 0.7619048
 
No Tests
 
1   
2    package pl.magot.vetch.widgets;
3   
4   
5    import java.util.*;
6    import android.content.*;
7    import android.view.*;
8    import android.widget.LinearLayout.LayoutParams;
9    import android.graphics.*;
10   
11   
 
12    public class TimeWidgetSlider extends View
13    {
14    //types
 
15    public interface OnTimeChange
16    {
17    public void OnChange(TimeWidgetSlider slider);
18    }
19   
20    //types
 
21    private class ValueBox
22    {
23    //fields
24    public int iValue = 0;
25    @SuppressWarnings("unused")
26    public int iLeftOffset = 0;
27    @SuppressWarnings("unused")
28    public int iWidth = 0;
29    public String strValue = null;
30    public int iStrWidth = 0;
31    public int iStrWidthSmall = 0;
32   
33    //methods
 
34  72 toggle public ValueBox(int iValue, int iLeftOffset, int iWidth, Paint pt)
35    {
36  72 this.iValue = iValue;
37  72 this.iLeftOffset = iLeftOffset;
38  72 this.iWidth = iWidth;
39  72 strValue = getValueStr();
40  72 calcValueStrWidths(pt);
41    }
 
42  72 toggle private String getValueStr()
43    {
44  72 if (iSliderType == STYPE_MINUTES)
45  24 return Integer.toString(iValue * 5);
46  48 if (iSliderType == STYPE_HOURS)
47    {
48  48 if (b24HourMode)
49    {
50  0 return Integer.toString(iValue);
51    } else {
52  48 int iDisplayHour = iValue;
53  48 if (iDisplayHour == 0)
54  2 iDisplayHour = 12;
55  48 if (iDisplayHour > 12)
56  22 iDisplayHour -= 12;
57  48 return Integer.toString(iDisplayHour);
58    }
59    }
60  0 return "";
61    }
 
62  72 toggle public void calcValueStrWidths(Paint pt)
63    {
64  72 pt.setFakeBoldText(true);
65  72 pt.setTypeface(tfMono);
66   
67  72 pt.setTextSize(fTextSize);
68  72 iStrWidth = (int)pt.measureText(strValue);
69   
70  72 pt.setTextSize(fTextSizeSmall);
71  72 iStrWidthSmall = (int)pt.measureText(strValue);
72    }
 
73  0 toggle @SuppressWarnings("unused")
74    public boolean isPM()
75    {
76  0 if (iValue >= 12)
77  0 return true;
78  0 return false;
79    }
80    }
81   
82    //fields
83    private ArrayList<ValueBox> vecValues = new ArrayList<ValueBox>();
84   
85    //fields
86    private final static int iColorBkg = 0xff777777;
87    private final static int iColorLightBkg = 0xffcccccc;
88    private final static int iColorSliderBkg = 0xff444444;
89    private final static int iColorButtonArrows = 0xff444444;
90    private final static int iColorSliderCenterBox = 0xffffffff;
91    private final static int iColorValueBoxText = 0xff666666;
92    private final static int iColorValueBoxBkg = 0xffbbbbbb;
93    private final static int iColorValueBoxTextSelected = 0xff222222;
94   
95    //fields
96    private final static Typeface tfMono = Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL);
97    private final static float fTextSize = 28;
98    private final static float fTextSizeSmall = 22;
99    private final static int iFocusBorder = 3;
100    private final static int iSliderSpace = 4;
101    private final static int iSliderBorder = 4;
102    private final static int iBoxBorder = 4;
103    private final static int iSliderButtonWidth = 40;
104   
105    //fields
106    protected OnTimeChange mOnTimeChange = null;
107   
108    //fields
109    private Paint pt = new Paint();
110    private RectF rectFocus = new RectF();
111    private RectF rect = new RectF();
112    private RectF rectBar = new RectF();
113    private RectF rectBox = new RectF();
114    private RectF rectCenterBox = new RectF();
115    private RectF rectButtonLeft = new RectF();
116    private RectF rectButtonRight = new RectF();
117    private RectF rectSlider = new RectF();
118   
119    //fields
120    private boolean b24HourMode = false;
121    private int iSliderType = 0;
122    private boolean bNoValue = false;
123    private int iCurrentValue = -1;
124   
125    //fields
126    private boolean bTouchedDownSlider = false;
127    private boolean bTouchedDownBtnLeft = false;
128    private boolean bTouchedDownBtnRight = false;
129    private int iTouchedSliderPosX = 0;
130   
131    //fields
132    public final static int STYPE_HOURS = 1;
133    public final static int STYPE_MINUTES = 2;
134   
135    //fields
136    private int iBoxWidth = 0;
137    private BlurMaskFilter filterBlur = new BlurMaskFilter(0.5F, BlurMaskFilter.Blur.NORMAL);
138   
139    //fields
140    private int iAnimPosX = 0;
141    private int iAnimDelta = 0;
142    private long mLastTime = 0;
143    private final static int iAnimStep = 12;
144   
145    //methods
 
146  4 toggle public TimeWidgetSlider(Context context, boolean b24HourMode, int iSliderType, int iWidth)
147    {
148  4 super(context);
149  4 this.b24HourMode = b24HourMode;
150  4 this.iSliderType = iSliderType;
151  4 setFocusable(true);
152   
153  4 final int iHeight = getTotalHeight();
154  4 setLayoutParams(new LayoutParams(iWidth, iHeight));
155   
156    //init sizes
157  4 iBoxWidth = getBoxWidth();
158  4 initRectangles(iWidth, iHeight);
159   
160  4 generateValues();
161  4 setValue(getValue(), false);
162    }
163   
 
164  4 toggle public void setTimeChangeEvent(OnTimeChange timeChange)
165    {
166  4 this.mOnTimeChange = timeChange;
167    }
168   
 
169  31 toggle public void doTimeChanged()
170    {
171  31 if (mOnTimeChange != null)
172  27 mOnTimeChange.OnChange(this);
173    }
174   
 
175  4 toggle private int getBoxWidth()
176    {
177  4 pt.setTypeface(tfMono);
178  4 pt.setTextSize(fTextSize);
179  4 pt.setFakeBoldText(true);
180  4 return iBoxBorder + (int)pt.measureText("00") + iBoxBorder;
181    }
182   
 
183  4 toggle private void initRectangles(int iWidth, int iHeight)
184    {
185  4 rectFocus.set(0, 0, iWidth, iHeight);
186   
187  4 rect.set(rectFocus);
188  4 rect.inset(0, iFocusBorder);
189   
190  4 rectBar.set(iFocusBorder,
191    iFocusBorder + iSliderBorder + iSliderSpace,
192    iWidth - iFocusBorder,
193    iHeight - iSliderSpace - iSliderBorder - iFocusBorder);
194   
195  4 rectButtonLeft.set(rect);
196  4 rectButtonLeft.right = iSliderButtonWidth;
197  4 rectButtonRight.set(rect);
198  4 rectButtonRight.left = rectButtonRight.right - iSliderButtonWidth;
199   
200  4 rectSlider.set(rectBar);
201  4 rectSlider.left = rectButtonLeft.right;
202  4 rectSlider.right = rectButtonRight.left;
203   
204  4 rectCenterBox.set(rectSlider);
205  4 rectCenterBox.top -= iSliderSpace;
206  4 rectCenterBox.bottom += iSliderSpace;
207  4 rectCenterBox.left += ((int)rectCenterBox.width() >> 1) - (iBoxWidth >> 1);
208  4 rectCenterBox.right = rectCenterBox.left + iBoxWidth;
209    }
210   
 
211  0 toggle public void clearValue()
212    {
213  0 this.bNoValue = true;
214  0 this.invalidate();
215  0 doTimeChanged();
216    }
217   
 
218  31 toggle public void setValue(int iValue, boolean bAnimate)
219    {
220  31 this.bNoValue = false;
221  31 int iMax = 0;
222  31 if (iSliderType == STYPE_HOURS)
223  14 iMax = (vecValues.size() - 1);
224  31 if (iSliderType == STYPE_MINUTES)
225  17 iMax = (vecValues.size() - 1) * 5;
226   
227  31 this.iAnimDelta = (iCurrentValue - iValue);
228   
229  31 if (iValue < 0)
230    {
231  5 iValue = iMax;
232    }
233  31 if (iValue > iMax)
234    {
235  0 iValue = 0;
236    }
237   
238  31 this.iCurrentValue = iValue;
239   
240  31 this.iAnimPosX = 0;
241  31 if (iAnimDelta > 0)
242  10 this.iAnimPosX = 0;
243  31 if (iAnimDelta < 0)
244  17 this.iAnimPosX = iBoxWidth;
245   
246  31 if (!bAnimate)
247    {
248  8 this.iAnimPosX = 0;
249  8 this.iAnimDelta = 0;
250    }
251   
252  31 this.invalidate();
253  31 doTimeChanged();
254    }
255   
 
256  85 toggle public int getValue()
257    {
258  85 return this.iCurrentValue;
259    }
260   
 
261  15952 toggle private int getTextHeight()
262    {
263  15952 return (int)(-pt.ascent() + pt.descent());
264    }
265   
 
266  4 toggle private int getTotalHeight()
267    {
268  4 pt.setTextSize(fTextSize);
269  4 return iSliderBorder + iSliderSpace + iBoxBorder + getTextHeight() + iBoxBorder + iSliderSpace + iSliderBorder;
270    }
271   
 
272  0 toggle @Override
273    public boolean onKeyDown(int keyCode, KeyEvent event)
274    {
275  0 boolean bResult = super.onKeyDown(keyCode, event);
276  0 if ((keyCode == KeyEvent.KEYCODE_DPAD_CENTER) || (keyCode == KeyEvent.KEYCODE_ENTER))
277    {
278    }
279  0 if (keyCode == KeyEvent.KEYCODE_DPAD_LEFT)
280    {
281  0 bTouchedDownBtnLeft = true;
282  0 doClickSliderButton();
283  0 clearTouchButtonsFlags();
284    }
285  0 if (keyCode == KeyEvent.KEYCODE_DPAD_RIGHT)
286    {
287  0 bTouchedDownBtnRight = true;
288  0 doClickSliderButton();
289  0 clearTouchButtonsFlags();
290    }
291  0 return bResult;
292    }
293   
 
294  0 toggle @Override
295    public boolean onKeyUp(int keyCode, KeyEvent event)
296    {
297  0 boolean bResult = super.onKeyUp(keyCode, event);
298  0 return bResult;
299    }
300   
 
301  4 toggle private void generateValues()
302    {
303  4 vecValues.clear();
304  4 if (iSliderType == STYPE_HOURS)
305    {
306  2 generateValuesRange(24); //24 steps = 24 hours
307    }
308  4 if (iSliderType == STYPE_MINUTES)
309    {
310  2 generateValuesRange(12); //12 steps * 5 minutes = 60minutes
311    }
312    }
313   
 
314  4 toggle private void generateValuesRange(int iRange)
315    {
316  4 int iLeftOffset = 0;
317  76 for (int iValue = 0; iValue < iRange; iValue++)
318    {
319  72 ValueBox value = new ValueBox(iValue, iLeftOffset, iBoxWidth, pt);
320  72 vecValues.add(value);
321  72 iLeftOffset += iBoxWidth;
322    }
323    }
324   
 
325  886 toggle private void updateAnimationState()
326    {
327    //wait next frames for period of time
328  886 if ((System.currentTimeMillis() - mLastTime) < 30)
329  456 return;
330  430 mLastTime = System.currentTimeMillis();
331   
332    //animate slider scrolling
333  430 if (iAnimDelta < 0)
334    {
335  68 iAnimPosX -= iAnimStep;
336  68 if (iAnimPosX < 0)
337  17 iAnimDelta = 0;
338    }
339   
340  430 if (iAnimDelta > 0)
341    {
342  23 iAnimPosX += iAnimStep;
343  23 if (iAnimPosX > iBoxWidth)
344  5 iAnimDelta = 0;
345    }
346   
347  430 if (iAnimDelta == 0)
348    {
349  361 iAnimPosX = 0;
350    }
351    }
352   
 
353  886 toggle @Override
354    protected void onDraw(Canvas canvas)
355    {
356  886 super.onDraw(canvas);
357   
358  886 updateAnimationState();
359   
360  886 drawBackground(canvas);
361   
362  886 if (!bNoValue)
363    {
364  886 drawSliderBars(canvas);
365    }
366   
367  886 drawFrames(canvas);
368   
369  886 drawSliderButtons(canvas);
370  886 drawArrowLeft(canvas);
371  886 drawArrowRight(canvas);
372   
373    //call next update
374  886 this.invalidate();
375    }
376   
 
377  886 toggle private void drawSliderBars(Canvas canvas)
378    {
379  886 canvas.save();
380  886 canvas.clipRect(rectSlider);
381   
382  886 int index = iCurrentValue;
383  886 if (iSliderType == STYPE_HOURS)
384  443 index = iCurrentValue;
385  886 if (iSliderType == STYPE_MINUTES)
386  443 index = iCurrentValue / 5;
387   
388    //draw center box
389  886 final ValueBox value = vecValues.get(index);
390  886 rectBox.set(rectSlider);
391  886 rectBox.left = rectCenterBox.left + iAnimPosX;
392  886 rectBox.right = rectBox.left + iBoxWidth;
393  886 drawValueBox(canvas, rectBox, value);
394   
395    //draw left boxes
396  886 int iLeftIndex = index - 1;
397  886 rectBox.set(rectSlider);
398  886 rectBox.left = rectCenterBox.left - iBoxWidth + iAnimPosX;
399  886 rectBox.right = rectBox.left + iBoxWidth;
400  4430 for (int i = 0; i < 4; i++)
401    {
402  3544 if (iLeftIndex < 0)
403  302 iLeftIndex = vecValues.size() - 1;
404  3544 final ValueBox valueLeft = vecValues.get(iLeftIndex);
405  3544 drawValueBox(canvas, rectBox, valueLeft);
406  3544 rectBox.left -= iBoxWidth;
407  3544 rectBox.right = rectBox.left + iBoxWidth;
408  3544 iLeftIndex--;
409    }
410   
411    //draw right boxes
412  886 int iRightIndex = index + 1;
413  886 rectBox.set(rectSlider);
414  886 rectBox.left = rectCenterBox.right + iAnimPosX;
415  886 rectBox.right = rectBox.left + iBoxWidth;
416  4430 for (int i = 0; i < 4; i++)
417    {
418  3544 if (iRightIndex > (vecValues.size() - 1))
419  93 iRightIndex = 0;
420  3544 final ValueBox valueRight = vecValues.get(iRightIndex);
421  3544 drawValueBox(canvas, rectBox, valueRight);
422  3544 rectBox.left += iBoxWidth;
423  3544 rectBox.right = rectBox.left + iBoxWidth;
424  3544 iRightIndex++;
425    }
426   
427  886 canvas.restore();
428    }
429   
 
430  886 toggle private void drawBackground(Canvas canvas)
431    {
432  886 pt.setShader(null);
433  886 pt.setAntiAlias(true);
434   
435    //focus background
436  886 if (this.isFocused())
437    {
438  0 pt.setColor(0xffff8800);
439  0 canvas.drawRoundRect(rectFocus, 2, 2, pt);
440    }
441   
442    //background
443  886 pt.setColor(iColorBkg);
444  886 final int iRoundCorner = this.isFocused()?0:2;
445  886 canvas.drawRoundRect(rect, iRoundCorner, iRoundCorner, pt);
446   
447    //draw slider background outer frame
448  886 pt.setColor(iColorSliderBkg);
449  886 canvas.drawRect(rectSlider, pt);
450   
451    //draw slider background inner frame
452  886 pt.setColor(iColorValueBoxBkg);
453  886 canvas.drawRect(rectSlider.left, rectSlider.top + 1, rectSlider.right, rectSlider.bottom -1, pt);
454   
455    //center box background
456  886 if (!bNoValue)
457    {
458  886 pt.setColor(iColorSliderCenterBox);
459  886 canvas.drawRoundRect(rectCenterBox, 2, 2, pt);
460    }
461    }
462   
 
463  7974 toggle private boolean isCurrentBoxSelected(RectF rect)
464    {
465  7974 if ((rect.left >= rectCenterBox.left) && (rect.right <= rectCenterBox.right))
466  745 return true;
467  7229 return false;
468    }
469   
 
470  7974 toggle private void drawValueBox(Canvas canvas, RectF rect, ValueBox value)
471    {
472  7974 final boolean bSelected = isCurrentBoxSelected(rect);
473   
474    //draw value number
475  7974 pt.setShader(null);
476  7974 pt.setAntiAlias(true);
477  7974 pt.setFakeBoldText(true);
478  7974 pt.setTypeface(tfMono);
479  7974 pt.setUnderlineText(false);
480   
481  7974 pt.setTextSize(fTextSizeSmall);
482  7974 if (bSelected)
483  745 pt.setTextSize(fTextSize);
484   
485  7974 if (iAnimPosX != 0)
486  1341 pt.setMaskFilter(filterBlur);
487   
488  7974 final int iNumberWidth = (bSelected)?value.iStrWidth:value.iStrWidthSmall;
489   
490  7974 int iTextPosX = (int)rect.right - iNumberWidth;
491  7974 int iTextPosY = (int)rect.bottom + (int)(-pt.ascent()) - getTextHeight();
492   
493  7974 iTextPosX -= ((int)rect.width() >> 1) - (iNumberWidth >> 1);
494  7974 iTextPosY -= ((int)rect.height() >> 1) - (getTextHeight() >> 1);
495   
496  7974 iTextPosY += 1;
497   
498  7974 pt.setColor((bSelected)?iColorValueBoxTextSelected:iColorValueBoxText);
499  7974 canvas.drawText(value.strValue, iTextPosX, iTextPosY, pt);
500   
501  7974 pt.setMaskFilter(null);
502    }
503   
 
504  886 toggle private void drawSliderButtons(Canvas canvas)
505    {
506  886 pt.setShader(null);
507  886 pt.setAntiAlias(true);
508  886 pt.setFakeBoldText(true);
509  886 pt.setTypeface(tfMono);
510  886 pt.setTextSize(fTextSize);
511  886 pt.setUnderlineText(false);
512   
513  886 pt.setColor((bTouchedDownBtnLeft)?iColorLightBkg:iColorBkg);
514  886 canvas.drawRoundRect(rectButtonLeft, 2, 2, pt);
515   
516  886 pt.setColor((bTouchedDownBtnRight)?iColorLightBkg:iColorBkg);
517  886 canvas.drawRoundRect(rectButtonRight, 2, 2, pt);
518    }
519   
 
520  886 toggle private void drawFrames(Canvas canvas)
521    {
522  886 pt.setColor(iColorSliderBkg);
523  886 pt.setStrokeWidth(0);
524  886 pt.setAntiAlias(false);
525   
526    //slider frame
527  886 canvas.drawLine(rectSlider.left, rectSlider.top, rectSlider.left, rectSlider.bottom, pt);
528  886 canvas.drawLine(rectSlider.right - 1, rectSlider.top, rectSlider.right - 1, rectSlider.bottom, pt);
529   
530    //center box frame
531  886 canvas.drawLine(rectCenterBox.left - 1, rectSlider.top, rectCenterBox.left - 1, rectSlider.bottom, pt);
532  886 canvas.drawLine(rectCenterBox.right, rectSlider.top, rectCenterBox.right, rectSlider.bottom, pt);
533    }
534   
 
535  886 toggle private void drawArrowLeft(Canvas canvas)
536    {
537  886 final int iH = 8;
538  886 final int iH2 = 4;
539  886 final int iV = 14;
540  886 final int iX = (int)rectButtonLeft.centerX();
541  886 final int iY = (int)rectButtonLeft.centerY();
542  886 pt.setAntiAlias(true);
543  886 pt.setStrokeCap(Paint.Cap.ROUND);
544  886 pt.setStrokeWidth(6);
545  886 pt.setColor(iColorButtonArrows);
546  886 canvas.drawLine(iX - iH, iY, iX + iH2, rectButtonLeft.top + iV, pt);
547  886 canvas.drawLine(iX - iH, iY, iX + iH2, rectButtonLeft.bottom - iV, pt);
548    }
549   
 
550  886 toggle private void drawArrowRight(Canvas canvas)
551    {
552  886 final int iH = 8;
553  886 final int iH2 = 4;
554  886 final int iV = 14;
555  886 final int iX = (int)rectButtonRight.centerX();
556  886 final int iY = (int)rectButtonRight.centerY();
557  886 pt.setAntiAlias(true);
558  886 pt.setStrokeCap(Paint.Cap.ROUND);
559  886 pt.setStrokeWidth(6);
560  886 pt.setColor(iColorButtonArrows);
561  886 canvas.drawLine(iX - iH2, rectButtonRight.top + iV, iX + iH, iY, pt);
562  886 canvas.drawLine(iX - iH2, rectButtonRight.bottom - iV, iX + iH, iY, pt);
563    }
564   
 
565  0 toggle @Override
566    protected void onFocusChanged(boolean gainFocus, int direction, Rect previouslyFocusedRect)
567    {
568  0 super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
569  0 invalidate();
570    }
571   
 
572  23 toggle private void doClickSliderButton()
573    {
574  23 int iStep = 0;
575  23 if (iSliderType == STYPE_MINUTES)
576  13 iStep = 5;
577  23 if (iSliderType == STYPE_HOURS)
578  10 iStep = 1;
579  23 if (bTouchedDownBtnLeft)
580    {
581  6 int iValue = getValue() - iStep;
582  6 setValue(iValue, true);
583    }
584  23 if (bTouchedDownBtnRight)
585    {
586  17 int iValue = getValue() + iStep;
587  17 setValue(iValue, true);
588    }
589    }
590   
 
591  23 toggle private boolean touchInSliderButtonsArea(MotionEvent event)
592    {
593  23 clearTouchButtonsFlags();
594  23 if (rectButtonLeft.contains(event.getX(), event.getY()))
595    {
596  6 bTouchedDownBtnLeft = true;
597  6 return true;
598    }
599  17 if (rectButtonRight.contains(event.getX(), event.getY()))
600    {
601  17 bTouchedDownBtnRight = true;
602  17 return true;
603    }
604  0 return false;
605    }
606   
 
607  46 toggle private void clearTouchButtonsFlags()
608    {
609  46 bTouchedDownBtnLeft = false;
610  46 bTouchedDownBtnRight = false;
611    }
612   
 
613  23 toggle private void clearTouchSliderFlags()
614    {
615  23 bTouchedDownSlider = false;
616    }
617   
 
618  0 toggle private boolean touchInSliderArea(MotionEvent event)
619    {
620  0 clearTouchSliderFlags();
621  0 if (rectSlider.contains(event.getX(), event.getY()))
622    {
623  0 bTouchedDownSlider = true;
624  0 iTouchedSliderPosX = (int)event.getX();
625  0 return true;
626    }
627  0 return false;
628    }
629   
 
630  25 toggle private void touchSliderMoved(MotionEvent event)
631    {
632  25 if (bTouchedDownSlider)
633    {
634  0 final int iDelta = (iTouchedSliderPosX - (int)event.getX());
635   
636  0 if (Math.abs(iDelta) >= (iBoxWidth * 0.7))
637    {
638    //move right
639  0 if (iDelta > 0)
640  0 bTouchedDownBtnRight = true;
641    //move left
642  0 if (iDelta < 0)
643  0 bTouchedDownBtnLeft = true;
644   
645  0 iTouchedSliderPosX = (int)event.getX();
646  0 invalidate();
647  0 doClickSliderButton();
648  0 clearTouchButtonsFlags();
649    }
650    }
651    }
652   
 
653  71 toggle @Override
654    public boolean onTouchEvent(MotionEvent event)
655    {
656  71 boolean bHandled = false;
657  71 if (event.getAction() == MotionEvent.ACTION_DOWN)
658    {
659  23 if (touchInSliderButtonsArea(event) || touchInSliderArea(event))
660    {
661  23 bHandled = true;
662  23 invalidate();
663    }
664    }
665  71 if (event.getAction() == MotionEvent.ACTION_CANCEL)
666    {
667  0 clearTouchButtonsFlags();
668  0 clearTouchSliderFlags();
669  0 bHandled = true;
670  0 invalidate();
671    }
672  71 if (event.getAction() == MotionEvent.ACTION_UP)
673    {
674  23 bHandled = true;
675  23 invalidate();
676  23 doClickSliderButton();
677  23 clearTouchButtonsFlags();
678  23 clearTouchSliderFlags();
679  23 invalidate();
680    }
681  71 if (event.getAction() == MotionEvent.ACTION_MOVE)
682    {
683  25 touchSliderMoved(event);
684  25 bHandled = true;
685  25 invalidate();
686    }
687  71 return bHandled;
688    }
689   
690    }