Fix constants in switch cases
This commit is contained in:
parent
fbb5301075
commit
cc0bf4bc43
1 changed files with 3 additions and 3 deletions
|
@ -110,19 +110,19 @@ public class XashTutorialActivity extends Activity implements View.OnClickListen
|
||||||
{
|
{
|
||||||
switch( e.getAction() )
|
switch( e.getAction() )
|
||||||
{
|
{
|
||||||
case e.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
// store swipe start
|
// store swipe start
|
||||||
lastx = firstx = e.getX();
|
lastx = firstx = e.getX();
|
||||||
// animation will be started on next scroll event
|
// animation will be started on next scroll event
|
||||||
anim = true;
|
anim = true;
|
||||||
break;
|
break;
|
||||||
case e.ACTION_MOVE:
|
case MotionEvent.ACTION_MOVE:
|
||||||
// animation will start in supercall, so select direction now
|
// animation will start in supercall, so select direction now
|
||||||
isInc = e.getX() < lastx;
|
isInc = e.getX() < lastx;
|
||||||
targetPage = isInc?currentPage+1:currentPage-1;
|
targetPage = isInc?currentPage+1:currentPage-1;
|
||||||
lastx = e.getX();
|
lastx = e.getX();
|
||||||
break;
|
break;
|
||||||
case e.ACTION_UP:
|
case MotionEvent.ACTION_UP:
|
||||||
// detect misstouch (<100 pixels)
|
// detect misstouch (<100 pixels)
|
||||||
if( Math.abs(e.getX()-firstx) < 100)
|
if( Math.abs(e.getX()-firstx) < 100)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue