Android
android.widget
public class

android.widget.DialerFilter

java.lang.Object
android.view.View Drawable.Callback KeyEvent.Callback
android.view.ViewGroup ViewManager ViewParent
android.widget.RelativeLayout
android.widget.DialerFilter

Summary

XML Attributes inherited from class android.widget.RelativeLayout
XML Attributes inherited from class android.view.ViewGroup
XML Attributes inherited from class android.view.View

Constants

      Value  
int  DIGITS_AND_LETTERS  This mode has both lines   0x00000001 
int  DIGITS_AND_LETTERS_NO_DIGITS  This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the digits matching, leaving only the letters line   0x00000002 
int  DIGITS_AND_LETTERS_NO_LETTERS  This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the letters matching, leaving only the digits line   0x00000003 
int  DIGITS_ONLY  This mode has only the digits line   0x00000004 
int  LETTERS_ONLY  This mode has only the letters line   0x00000005 
Constants inherited from class android.widget.RelativeLayout
Constants inherited from class android.view.ViewGroup
Constants inherited from class android.view.View
Fields inherited from class android.view.ViewGroup
Fields inherited from class android.view.View

Public Constructors

            DialerFilter(Context context)
            DialerFilter(Context context, AttributeSet attrs)

Public Methods

          void  append(String text)
          void  clearText()
Clears both the digits and the filter text.
          CharSequence  getDigits()
          CharSequence  getFilterText()
          CharSequence  getLetters()
          int  getMode()
          boolean  isQwertyKeyboard()
          boolean  onKeyDown(int keyCode, KeyEvent event)
Default implementation of KeyEvent.Callback.onKeyMultiple(): perform press of the view when KEYCODE_DPAD_CENTER or KEYCODE_ENTER is released, if the view is enabled and clickable.
          boolean  onKeyUp(int keyCode, KeyEvent event)
Default implementation of KeyEvent.Callback.onKeyMultiple(): perform clicking of the view when KEYCODE_DPAD_CENTER or KEYCODE_ENTER is released.
          void  removeFilterWatcher(TextWatcher watcher)
          void  setDigitsWatcher(TextWatcher watcher)
          void  setFilterWatcher(TextWatcher watcher)
          void  setLettersWatcher(TextWatcher watcher)
          void  setMode(int newMode)
Change the mode of the widget.

Protected Methods

          void  onFinishInflate()
Finalize inflating a view from XML.
          void  onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)
Only show the icon view when focused, if there is one.
          void  onModeChange(int oldMode, int newMode)
Called right after the mode changes to give subclasses the option to restyle, etc.
Methods inherited from class android.widget.RelativeLayout
Methods inherited from class android.view.ViewGroup
Methods inherited from class android.view.View
Methods inherited from class java.lang.Object
Methods inherited from interface android.graphics.drawable.Drawable.Callback
Methods inherited from interface android.view.KeyEvent.Callback
Methods inherited from interface android.view.ViewManager
Methods inherited from interface android.view.ViewParent

Details

Constants

public static final int DIGITS_AND_LETTERS

This mode has both lines
Constant Value: 1 (0x00000001)

public static final int DIGITS_AND_LETTERS_NO_DIGITS

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the digits matching, leaving only the letters line
Constant Value: 2 (0x00000002)

public static final int DIGITS_AND_LETTERS_NO_LETTERS

This mode is when after starting in DIGITS_AND_LETTERS mode the filter has removed all possibility of the letters matching, leaving only the digits line
Constant Value: 3 (0x00000003)

public static final int DIGITS_ONLY

This mode has only the digits line
Constant Value: 4 (0x00000004)

public static final int LETTERS_ONLY

This mode has only the letters line
Constant Value: 5 (0x00000005)

Public Constructors

public DialerFilter(Context context)

public DialerFilter(Context context, AttributeSet attrs)

Public Methods

public void append(String text)

public void clearText()

Clears both the digits and the filter text.

public CharSequence getDigits()

public CharSequence getFilterText()

public CharSequence getLetters()

public int getMode()

public boolean isQwertyKeyboard()

public boolean onKeyDown(int keyCode, KeyEvent event)

Default implementation of KeyEvent.Callback.onKeyMultiple(): perform press of the view when KEYCODE_DPAD_CENTER or KEYCODE_ENTER is released, if the view is enabled and clickable.

Parameters

keyCode A key code that represents the button pressed, from KeyEvent.
event The KeyEvent object that defines the button action.

public boolean onKeyUp(int keyCode, KeyEvent event)

Default implementation of KeyEvent.Callback.onKeyMultiple(): perform clicking of the view when KEYCODE_DPAD_CENTER or KEYCODE_ENTER is released.

Parameters

keyCode A key code that represents the button pressed, from KeyEvent.
event The KeyEvent object that defines the button action.

public void removeFilterWatcher(TextWatcher watcher)

public void setDigitsWatcher(TextWatcher watcher)

public void setFilterWatcher(TextWatcher watcher)

public void setLettersWatcher(TextWatcher watcher)

public void setMode(int newMode)

Change the mode of the widget.

Parameters

newMode The mode to switch to.

Protected Methods

protected void onFinishInflate()

Finalize inflating a view from XML. This is called as the last phase of inflation, after all child views have been added.

Even if the subclass overrides onFinishInflate, they should always be sure to call the super method, so that we get called.

protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)

Only show the icon view when focused, if there is one.

Parameters

focused True if the View has focus; false otherwise.
direction The direction focus has moved when requestFocus() is called to give this view focus. Values are View.FOCUS_UP, View.FOCUS_DOWN, View.FOCUS_LEFT or View.FOCUS_RIGHT. It may not always apply, in which case use the default.
previouslyFocusedRect The rectangle, in this view's coordinate system, of the previously focused view. If applicable, this will be passed in as finer grained information about where the focus is coming from (in addition to direction). Will be null otherwise.

protected void onModeChange(int oldMode, int newMode)

Called right after the mode changes to give subclasses the option to restyle, etc.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:56