Build 1.0_r1(from source)

android.widget
Class DialerFilter

java.lang.Object
  extended by android.view.View
      extended by android.view.ViewGroup
          extended by android.widget.RelativeLayout
              extended by android.widget.DialerFilter
All Implemented Interfaces:
Drawable.Callback, KeyEvent.Callback, ViewManager, ViewParent

public class DialerFilter
extends RelativeLayout


Nested Class Summary
 
Nested classes/interfaces inherited from class android.widget.RelativeLayout
RelativeLayout.LayoutParams
 
Nested classes/interfaces inherited from class android.view.ViewGroup
ViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListener
 
Nested classes/interfaces inherited from class android.view.View
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener
 
Field Summary
static int DIGITS_AND_LETTERS
          This mode has both lines
static 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
static 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
static int DIGITS_ONLY
          This mode has only the digits line
static int LETTERS_ONLY
          This mode has only the letters line
(package private)  EditText mDigits
           
(package private)  EditText mHint
           
(package private)  ImageView mIcon
           
(package private)  InputFilter[] mInputFilters
           
(package private)  EditText mLetters
           
(package private)  int mMode
           
(package private)  EditText mPrimary
           
 
Fields inherited from class android.widget.RelativeLayout
ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, LEFT_OF, RIGHT_OF, TRUE
 
Fields inherited from class android.view.ViewGroup
CLIP_TO_PADDING_MASK, FLAG_SUPPORT_STATIC_TRANSFORMATIONS, FLAG_USE_CHILD_DRAWING_ORDER, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, mDisappearingChildren, mGroupFlags, mOnHierarchyChangeListener, mPersistentDrawingCache, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHE
 
Fields inherited from class android.view.View
DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIRST_STATE_SET, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, INVISIBLE, KEEP_SCREEN_ON, LAST_STATE_SET, mBottom, mContext, mCurrentAnimation, MIDDLE_STATE_SET, mLayoutParams, mLeft, mLocation, mMeasuredHeight, mMeasuredWidth, mOnClickListener, mOnCreateContextMenuListener, mOnFocusChangeListener, mOnLongClickListener, mPaddingBottom, mPaddingLeft, mPaddingRight, mPaddingTop, mParent, mRight, mScrollX, mScrollY, mTag, mTop, NO_ID, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FIRST_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_LAST_STATE_SET, PRESSED_MIDDLE_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_SINGLE_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SINGLE_STATE_SET, SOUND_EFFECTS_ENABLED, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET
 
Constructor Summary
DialerFilter(Context context)
           
DialerFilter(Context context, AttributeSet attrs)
           
 
Method Summary
 void append(String text)
           
 void clearText()
          Clears both the digits and the filter text.
 CharSequence getDigits()
           
 CharSequence getFilterText()
           
 CharSequence getLetters()
           
 int getMode()
           
 boolean isQwertyKeyboard()
           
protected  void onFinishInflate()
          Finalize inflating a view from XML.
protected  void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect)
          Only show the icon view when focused, if there is one.
 boolean onKeyDown(int keyCode, KeyEvent event)
          Default implementation of KeyEvent.Callback.onKeyMultiple(): perform press of the view when KeyEvent.KEYCODE_DPAD_CENTER or KeyEvent.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 KeyEvent.KEYCODE_DPAD_CENTER or KeyEvent.KEYCODE_ENTER is released.
protected  void onModeChange(int oldMode, int newMode)
          Called right after the mode changes to give subclasses the option to restyle, etc.
 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.
 
Methods inherited from class android.widget.RelativeLayout
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getBaseline, onLayout, onMeasure, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity
 
Methods inherited from class android.view.ViewGroup
addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchDraw, dispatchFreezeSelfOnly, dispatchKeyEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, findFocus, findViewTraversal, findViewWithTagTraversal, fitSystemWindows, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getPersistentDrawingCache, hasFocus, hasFocusable, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawnWithCacheEnabled, measureChild, measureChildren, measureChildWithMargins, offsetChildrenTopAndBottom, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onCreateDrawableState, onInterceptTouchEvent, onRequestFocusInDescendants, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setOnHierarchyChangeListener, setPadding, setPersistentDrawingCache, showContextMenuForChild, startLayoutAnimation, updateViewLayout
 
Methods inherited from class android.view.View
applyDrawableToTransparentRegion, bringToFront, buildDrawingCache, cancelLongPress, clearAnimation, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, debug, debugIndent, destroyDrawingCache, dispatchKeyShortcutEvent, draw, finalize, findViewById, findViewWithTag, focusSearch, forceLayout, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getContext, getContextMenuInfo, getDefaultSize, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getKeepScreenOn, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMeasuredHeight, getMeasuredWidth, getNextFocusDownId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getParent, getResources, getRight, getRightFadingEdgeStrength, getRootView, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getTag, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getVerticalFadingEdgeLength, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowToken, getWindowVisibility, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isClickable, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isInTouchMode, isLayoutRequested, isLongClickable, isPressed, isRootNamespace, isSaveEnabled, isSelected, isShown, isSoundEffectsEnabled, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAttachedToWindow, onCreateContextMenu, onDetachedFromWindow, onDraw, onKeyMultiple, onKeyShortcut, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSetAlpha, onSizeChanged, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowVisibilityChanged, performClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setFrame, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setIsRootNamespace, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPressed, setSaveEnabled, setScrollBarStyle, setSelected, setSoundEffectsEnabled, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.view.ViewParent
createContextMenu, getParent, isLayoutRequested, requestLayout
 

Field Detail

DIGITS_AND_LETTERS

public static final int DIGITS_AND_LETTERS
This mode has both lines

See Also:
Constant Field Values

DIGITS_AND_LETTERS_NO_DIGITS

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

See Also:
Constant Field Values

DIGITS_AND_LETTERS_NO_LETTERS

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

See Also:
Constant Field Values

DIGITS_ONLY

public static final int DIGITS_ONLY
This mode has only the digits line

See Also:
Constant Field Values

LETTERS_ONLY

public static final int LETTERS_ONLY
This mode has only the letters line

See Also:
Constant Field Values

mLetters

EditText mLetters

mDigits

EditText mDigits

mPrimary

EditText mPrimary

mHint

EditText mHint

mInputFilters

InputFilter[] mInputFilters

mIcon

ImageView mIcon

mMode

int mMode
Constructor Detail

DialerFilter

public DialerFilter(Context context)

DialerFilter

public DialerFilter(Context context,
                    AttributeSet attrs)
Method Detail

onFinishInflate

protected void onFinishInflate()
Description copied from class: View
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.

Overrides:
onFinishInflate in class View

onFocusChanged

protected void onFocusChanged(boolean focused,
                              int direction,
                              Rect previouslyFocusedRect)
Only show the icon view when focused, if there is one.

Overrides:
onFocusChanged in class View
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.

isQwertyKeyboard

public boolean isQwertyKeyboard()

onKeyDown

public boolean onKeyDown(int keyCode,
                         KeyEvent event)
Description copied from class: View
Default implementation of KeyEvent.Callback.onKeyMultiple(): perform press of the view when KeyEvent.KEYCODE_DPAD_CENTER or KeyEvent.KEYCODE_ENTER is released, if the view is enabled and clickable.

Specified by:
onKeyDown in interface KeyEvent.Callback
Overrides:
onKeyDown in class View
Parameters:
keyCode - A key code that represents the button pressed, from KeyEvent.
event - The KeyEvent object that defines the button action.
Returns:
If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

onKeyUp

public boolean onKeyUp(int keyCode,
                       KeyEvent event)
Description copied from class: View
Default implementation of KeyEvent.Callback.onKeyMultiple(): perform clicking of the view when KeyEvent.KEYCODE_DPAD_CENTER or KeyEvent.KEYCODE_ENTER is released.

Specified by:
onKeyUp in interface KeyEvent.Callback
Overrides:
onKeyUp in class View
Parameters:
keyCode - A key code that represents the button pressed, from KeyEvent.
event - The KeyEvent object that defines the button action.
Returns:
If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.

getMode

public int getMode()

setMode

public void setMode(int newMode)
Change the mode of the widget.

Parameters:
newMode - The mode to switch to.

getLetters

public CharSequence getLetters()

getDigits

public CharSequence getDigits()

getFilterText

public CharSequence getFilterText()

append

public void append(String text)

clearText

public void clearText()
Clears both the digits and the filter text.


setLettersWatcher

public void setLettersWatcher(TextWatcher watcher)

setDigitsWatcher

public void setDigitsWatcher(TextWatcher watcher)

setFilterWatcher

public void setFilterWatcher(TextWatcher watcher)

removeFilterWatcher

public void removeFilterWatcher(TextWatcher watcher)

onModeChange

protected void onModeChange(int oldMode,
                            int newMode)
Called right after the mode changes to give subclasses the option to restyle, etc.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature