android.text.method
Class TextKeyListener

java.lang.Object
  extended by android.text.method.MetaKeyKeyListener
      extended by android.text.method.BaseKeyListener
          extended by android.text.method.TextKeyListener
All Implemented Interfaces:
KeyListener, NoCopySpan, SpanWatcher

public class TextKeyListener
extends BaseKeyListener
implements SpanWatcher


Nested Class Summary
static class TextKeyListener.Capitalize
           
 
Nested classes/interfaces inherited from interface android.text.NoCopySpan
NoCopySpan.Concrete
 
Field Summary
 
Fields inherited from class android.text.method.MetaKeyKeyListener
META_ALT_LOCKED, META_ALT_ON, META_CAP_LOCKED, META_SHIFT_ON, META_SYM_LOCKED, META_SYM_ON
 
Constructor Summary
TextKeyListener(TextKeyListener.Capitalize cap, boolean autotext)
           
 
Method Summary
static void clear(Editable e)
           
 int getInputType()
           
static TextKeyListener getInstance()
           
static TextKeyListener getInstance(boolean autotext, TextKeyListener.Capitalize cap)
           
 boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event)
           
 boolean onKeyOther(View view, Editable content, KeyEvent event)
           
 boolean onKeyUp(View view, Editable content, int keyCode, KeyEvent event)
           
 void onSpanAdded(Spannable s, Object what, int start, int end)
           
 void onSpanChanged(Spannable s, Object what, int start, int end, int st, int en)
           
 void onSpanRemoved(Spannable s, Object what, int start, int end)
           
 void release()
           
static boolean shouldCap(TextKeyListener.Capitalize cap, CharSequence cs, int off)
           
 
Methods inherited from class android.text.method.BaseKeyListener
backspace, forwardDelete
 
Methods inherited from class android.text.method.MetaKeyKeyListener
adjustMetaAfterKeypress, adjustMetaAfterKeypress, clearMetaKeyState, clearMetaKeyState, clearMetaKeyState, getMetaState, getMetaState, getMetaState, getMetaState, handleKeyDown, handleKeyUp, isMetaTracker, isSelectingMetaTracker, resetLockedMeta, resetLockedMeta, resetMetaState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.text.method.KeyListener
clearMetaKeyState
 

Constructor Detail

TextKeyListener

public TextKeyListener(TextKeyListener.Capitalize cap,
                       boolean autotext)
Method Detail

getInstance

public static TextKeyListener getInstance(boolean autotext,
                                          TextKeyListener.Capitalize cap)

getInstance

public static TextKeyListener getInstance()

shouldCap

public static boolean shouldCap(TextKeyListener.Capitalize cap,
                                CharSequence cs,
                                int off)

getInputType

public int getInputType()
Specified by:
getInputType in interface KeyListener

onKeyDown

public boolean onKeyDown(View view,
                         Editable content,
                         int keyCode,
                         KeyEvent event)
Specified by:
onKeyDown in interface KeyListener
Overrides:
onKeyDown in class BaseKeyListener

onKeyUp

public boolean onKeyUp(View view,
                       Editable content,
                       int keyCode,
                       KeyEvent event)
Specified by:
onKeyUp in interface KeyListener
Overrides:
onKeyUp in class MetaKeyKeyListener

onKeyOther

public boolean onKeyOther(View view,
                          Editable content,
                          KeyEvent event)
Specified by:
onKeyOther in interface KeyListener
Overrides:
onKeyOther in class BaseKeyListener

clear

public static void clear(Editable e)

onSpanAdded

public void onSpanAdded(Spannable s,
                        Object what,
                        int start,
                        int end)
Specified by:
onSpanAdded in interface SpanWatcher

onSpanRemoved

public void onSpanRemoved(Spannable s,
                          Object what,
                          int start,
                          int end)
Specified by:
onSpanRemoved in interface SpanWatcher

onSpanChanged

public void onSpanChanged(Spannable s,
                          Object what,
                          int start,
                          int end,
                          int st,
                          int en)
Specified by:
onSpanChanged in interface SpanWatcher

release

public void release()


Copyright © 2008-2012. All Rights Reserved.