Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - TouchEvent simple Example Code

TouchEvent simple Example Code

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

TouchEvent simple Example Code

Postby CHAKYANAS » Sun Mar 23, 2008 3:44 pm

[align=center]Simple TouchEvent Example Code[/align]

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

Top

thanks for this

Postby androidonkey » Mon Mar 31, 2008 9:54 am

CHAKYANAS,

Thanks for this code snippet. It works quite well.

- androidonkey
androidonkey
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Feb 18, 2008 10:20 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests