wangyongjunqq / min3d

Automatically exported from code.google.com/p/min3d
0 stars 0 forks source link

Using onTouchEvent method in Min3D-Wallpaper-Fork #83

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Thanks for greatest framework for android, but I have a problem. I need to use 
ACTION_MOVE in my wallpaper application, but I don't know how to add a method 
onTouchEvent to CommonRender class. 

Original issue reported on code.google.com by elbia...@gmail.com on 5 Aug 2012 at 3:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
simply, you can implement onTouch activity Event

@Override
    public boolean onTouchEvent(MotionEvent event) {
        // TODO Auto-generated method stub

        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            onTouchDown(event);
            return true;
        }

        return super.onTouchEvent(event);
    }

this will allow you to get screen XY coords

Original comment by andrei.p...@gmail.com on 29 Jan 2013 at 7:02