net.sf.dictccfe.and
Class DictAndActivity.TextViewKeyListener

java.lang.Object
  extended by net.sf.dictccfe.and.DictAndActivity.TextViewKeyListener
All Implemented Interfaces:
android.view.View.OnKeyListener
Enclosing class:
DictAndActivity

private final class DictAndActivity.TextViewKeyListener
extends java.lang.Object
implements android.view.View.OnKeyListener

Calls search exact if the D-Pad center or Enter key has been pressed in the TextView above.

Version:
$Revision$
Author:
Daniel Stoinski

Field Summary
private  DictAndActivity m_activity
          The activity object to execute actions on it for pressed keys.
 
Constructor Summary
DictAndActivity.TextViewKeyListener(DictAndActivity anActivity)
          Initializes the object for the given activity.
 
Method Summary
 boolean onKey(android.view.View aView, int aKeyCode, android.view.KeyEvent anEvent)
          Calls exact searching for the given activity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_activity

private final DictAndActivity m_activity
The activity object to execute actions on it for pressed keys.

Constructor Detail

DictAndActivity.TextViewKeyListener

public DictAndActivity.TextViewKeyListener(DictAndActivity anActivity)
Initializes the object for the given activity.

Parameters:
anActivity - the activity to execute the action on.
Method Detail

onKey

public final boolean onKey(android.view.View aView,
                           int aKeyCode,
                           android.view.KeyEvent anEvent)
Calls exact searching for the given activity.

Specified by:
onKey in interface android.view.View.OnKeyListener
Parameters:
aView - ignored.
aKeyCode - checked for KeyEvent.KEYCODE_DPAD_CENTER or KeyEvent.KEYCODE_ENTER.
anEvent - Used for checking, if the key has been pressed down.
Returns:
true of the key event has been processed in this routine. So it returns ture for the pressed down D-Pad center or ENTER key. Else it returns false.