Use TouchScreen to call a KeyEvent

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

Use TouchScreen to call a KeyEvent

Postby willis127 » Thu Dec 03, 2009 4:38 am

Is there a way to call another KeyEvent based on a touch of the screen

FOR EXAMPLE

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. onTouch(MotionEvent event){
  3.  
  4. KeyEvent pressed = new KeyEvent(0, KeyEvent.KEYCODE_DPAD_CENTER);
  5.  
  6. return pressed;
  7.  
  8. }
  9.  
  10.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


So Is that possible ? or am I WAY off base with that one. Just wondering
willis127
Freshman
Freshman
 
Posts: 9
Joined: Wed Nov 11, 2009 8:03 pm

Top

Re: Use TouchScreen to call a KeyEvent

Postby saamyandroid » Mon Dec 07, 2009 12:54 pm

Ya its working.

u can proceed in this way
saamyandroid
Experienced Developer
Experienced Developer
 
Posts: 84
Joined: Wed Sep 09, 2009 8:17 pm
Location: INDIA

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 15 guests