some event mechanism

This commit is contained in:
Hannes Janetzek
2013-09-13 14:41:14 +02:00
parent 5389f59df0
commit 4e01de31f7
21 changed files with 405 additions and 144 deletions

View File

@@ -219,7 +219,7 @@ public class MapView extends RelativeLayout {
mPausing = false;
}
AndroidMotionEvent mMotionEvent = new AndroidMotionEvent();
AndroidMotionEvent mMotionEvent = new AndroidMotionEvent(this);
@Override
public boolean onTouchEvent(android.view.MotionEvent motionEvent) {
@@ -228,8 +228,9 @@ public class MapView extends RelativeLayout {
return false;
mMotionEvent.wrap(motionEvent);
mMap.handleMotionEvent(mMotionEvent);
return mMap.getLayers().handleMotionEvent(mMotionEvent);
return true;
}
// synchronized ???

View File

@@ -13,10 +13,19 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.oscim.android.input;
import org.oscim.backend.input.MotionEvent;
import org.oscim.event.MotionEvent;
public class AndroidMotionEvent extends MotionEvent {
/**
*
*/
private static final long serialVersionUID = 1L;
public AndroidMotionEvent(Object source) {
super(source);
}
android.view.MotionEvent mEvent;
public void wrap(android.view.MotionEvent e){