Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package org.mmin.handycalc; import ...; public class HandyFlipper extends ViewAnimator { // To view the full code, download the archive file http://www.anddev.org/files/handycalc_library_155.zip and import it in eclipse. MotionEvent motionDown, motionPrev; boolean motionCanceled; @Override public boolean onInterceptTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { motionDown = event; motionPrev = event; motionCanceled = false; // just record the ACTION_DOWN event and return false. the event will dispatch as a normal way. return false; } if (motionCanceled) return true; // canceled, then the child no need to process it. if (event.getAction() == MotionEvent.ACTION_MOVE) { motionPrev = event; // just record the ACTION_MOVE event and return false. the event will dispatch as a normal way. return false; } if (event.getAction() == MotionEvent.ACTION_UP) { if (motionDown == null || motionPrev == null) return false; long time = event.getEventTime() - motionDown.getEventTime(); if (time > motionInterval) return false; // the event's getX will be modify when deliver to child. so use getRawX instead float dx = event.getRawX() - motionDown.getRawX(); float absDx = Math.abs(dx); float dy = event.getRawY() - motionDown.getRawY(); float absDy = Math.abs(dy); float abs = Math.max(absDx, absDy); if (abs < motionDistance) return false; float v = Math.abs(abs) * 1000 / time; if (v < motionSpeed) { motionPrev = event; return false; } else { // start to flip. if it return true, the child will receive a event with MotionEvent.ACTION_CANCEL instead of MotionEvent.ACTION_UP // so make sure your custom widget will handle MotionEvent.ACTION_CANCEL motionDown = null; motionPrev = null; motionCanceled = true; if (abs == absDx) { if (!flipHorizontal) return false; if (dx < 0) return moveRight(); else return moveLeft(); } else { if (!flipVertical) return false; if (dy < 0) return moveDown(); else return moveUp(); } } } else if (event.getAction() == MotionEvent.ACTION_CANCEL) { motionDown = null; motionPrev = null; return false; } return false; } @Override public boolean dispatchTouchEvent(MotionEvent ev) { super.dispatchTouchEvent(ev); // always return true to tell the parent the event is processed return true; } @Override public boolean onTouchEvent(MotionEvent event) { this.onInterceptTouchEvent(event); // always return true to tell the parent the event is processed return true; } }