Do we have mice over an event in Android?

Do we have mice over an event in android? I want to set the text to the specific TextView

one that my mouse is on and discarded. Example: I want to drag and drop textview1 and drag it to another textview2 so that I can set the text of textview1 to textview2.

I have made examples of drag and drop, but I cannot find which control my mouse is on.

+3


source to share


2 answers


You can find a demo at this link:



   http://mobile-anarchy-widgets.googlecode.com/svn/trunk

      

+4


source


Yes, you can hover your mouse over Android

like on this docked tablet station

+ keyboard

.

You need OnGenericMotionListener

..

OnGenericMotion(...., MotionEvent me) {
   if (me.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE) {

   }

      



api14+

required

[Confirmed] Found a tablet with a usb mouse and can confirm it works for mouse movement. You will be filled with messages, so simple operations or sleep should be considered.

+1


source







All Articles