Drag and drop in a web application?

by Keith Hughitt » Fri, 11 Feb 2011 02:58:50 GMT

Sponsored Links
 Anyone know how it can be supported for web pages in Android browser?

Typically it is pretty straight-forward to support using a combination of 
the mouseDown, mouseMove, and mouseUp events. The default behavior in the 
Android web browser, however, is to drag the document itself. It looks like 
it should be possible, however, since Google maps drag behavior functions as 

Any advice would be appreciated.



Re: Drag and drop in a web application?

by Keith Hughitt » Fri, 11 Feb 2011 22:04:45 GMT

 Okay I found a solution which maps touch events to mouse events and seems to 
do the trick. In case anyone is interested, here is the link:



Sponsored Links

Other Threads

1. Adding view resource

there is a problem with  .java code.
it gives an error when i build it i am using eclipse.
it says for a resource id that is not in project i have taken the code
from internet .
how can i add a resource id that has view type data structure.


2. Accelerometer shake side-to-side detection issue

Hi everybody,

I'm developing an app and i need to detect when the user shakes the
phone from side to side , that means just along one axis (in this case
X) . That for i'm reading the values from the accelerometer, a bit of

private final double THRESHOLD = 0.2;

        public void onSensorChanged(SensorEvent event) {
                        if (series!=null){
                                if (event.values[0] < -THRESHOLD){
                                        moving = LEFT;
                                }else if (event.values[0] > THRESHOLD){
                                        moving = RIGHT;

I want to know when the user shakes the phone to the left and when to
the right, the problem is that my code does not detect shaking but
tilt, i have tested this code and it works when i tilt the phone to
left or to the right, but not when a shake it from side to side (no
matter the orientation of the phone).

do you guys know what i'm doing wrong? how would you code it? i'm
testing it on a Samsung galaxy.

- i dont what to detect an arbitrary shake , i want to detect the
acceleration along the x axis, something in this direction:(from the

When the device lies flat on a table and is pushed on its left side
toward the right, the x acceleration value is positive.

Thanks in advance.


3. help around using accelerometer sensor

4. How to add a new kernel module?

5. Android Developer's Challenge 2: Minors can't participate?

6. How to compile a kernel module to Android Linux Kernel 锛

7. How can you prevent somebody from calling in Android ?