Mouse Listener ?????

Put your problem here if it does not fit any of the other categories.

Mouse Listener ?????

Postby CHAKYANAS » Tue Mar 18, 2008 9:09 am

is Mouse Listener available in Anroid?????
User avatar
CHAKYANAS
Developer
Developer
 
Posts: 44
Joined: Mon Mar 03, 2008 5:08 am
Location: INDIA

Top

Postby Jesmiatka » Tue Mar 18, 2008 9:11 am

Why do you want to listen to a mouse?
You are simulating touching the screen when you are using the mouse clicks.
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Postby CHAKYANAS » Tue Mar 18, 2008 10:51 am

Hello Jemika,,,
Actualy I want to listen for mouse click on the map.....and i want to get the lat long of the POINT the user clicked....please help me.....
User avatar
CHAKYANAS
Developer
Developer
 
Posts: 44
Joined: Mon Mar 03, 2008 5:08 am
Location: INDIA

I got mouse click on Map..........

Postby CHAKYANAS » Thu Mar 20, 2008 10:29 am

mouse click on map can be recogonised and can be converted in to lat and long...................


Simple code for Mouse click

:roll: :wink:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  public boolean dispatchTouchEvent(MotionEvent ev)
  2.  
  3.   {
  4.  
  5.           int action = ev.getAction();
  6.  
  7.                 switch(action)
  8.  
  9.                         {
  10.  
  11.                                         case MotionEvent.ACTION_UP:
  12.  
  13.                                                  int X = (int)ev.getX();
  14.  
  15.                                      int Y = (int)ev.getY();
  16.  
  17.                                      checkInRange(X,Y);
  18.  
  19.                                      if( flag_for_Range==1)
  20.  
  21.                                      screencordToLat(X,Y);
  22.  
  23.                         break;
  24.  
  25.  
  26.  
  27.                         }
  28.  
  29.                  
  30.  
  31.         return false;
  32.  
  33.            }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
:roll: :roll: :wink:
User avatar
CHAKYANAS
Developer
Developer
 
Posts: 44
Joined: Mon Mar 03, 2008 5:08 am
Location: INDIA

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 17 guests