Build 1.0_r1(from source)

android.widget
Class ZoomButton

java.lang.Object
  extended by android.view.View
      extended by android.widget.ImageView
          extended by android.widget.ImageButton
              extended by android.widget.ZoomButton
All Implemented Interfaces:
Drawable.Callback, KeyEvent.Callback, View.OnLongClickListener

public class ZoomButton
extends ImageButton
implements View.OnLongClickListener


Nested Class Summary
 
Nested classes/interfaces inherited from class android.widget.ImageView
ImageView.ScaleType
 
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
 
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
ZoomButton(Context context)
           
ZoomButton(Context context, AttributeSet attrs)
           
ZoomButton(Context context, AttributeSet attrs, int defStyle)
           
 
Method Summary
 boolean dispatchUnhandledMove(View focused, int direction)
          This method is the last chance for the focused view and its ancestors to respond to an arrow key.
 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.
 boolean onLongClick(View v)
          Called when a view has been clicked and held.
 boolean onTouchEvent(MotionEvent event)
          Implement this method to handle touch screen motion events.
 void setEnabled(boolean enabled)
          Set the enabled state of this view.
 void setZoomSpeed(long speed)
           
 
Methods inherited from class android.widget.ImageButton
onSetAlpha
 
Methods inherited from class android.widget.ImageView
clearColorFilter, drawableStateChanged, getBaseline, getDrawable, getImageMatrix, getScaleType, invalidateDrawable, onCreateDrawableState, onDraw, onMeasure, setAdjustViewBounds, setAlpha, setColorFilter, setColorFilter, setFrame, setImageBitmap, setImageDrawable, setImageLevel, setImageMatrix, setImageResource, setImageState, setImageURI, setMaxHeight, setMaxWidth, setScaleType, setSelected, verifyDrawable
 
Methods inherited from class android.view.View
addFocusables, addTouchables, applyDrawableToTransparentRegion, bringToFront, buildDrawingCache, cancelLongPress, clearAnimation, clearFocus, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createContextMenu, debug, debug, debugIndent, destroyDrawingCache, dispatchDraw, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetPressed, dispatchSetSelected, dispatchTouchEvent, dispatchTrackballEvent, dispatchWindowFocusChanged, dispatchWindowVisibilityChanged, draw, finalize, findFocus, findViewById, findViewTraversal, findViewWithTag, findViewWithTagTraversal, fitSystemWindows, focusSearch, forceLayout, gatherTransparentRegion, 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, hasFocus, hasFocusable, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, 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, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCreateContextMenu, onDetachedFromWindow, onFinishInflate, onFocusChanged, onKeyDown, onKeyMultiple, onKeyShortcut, onLayout, onRestoreInstanceState, onSaveInstanceState, onScrollChanged, onSizeChanged, onTrackballEvent, onWindowFocusChanged, onWindowVisibilityChanged, performClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, refreshDrawableState, removeCallbacks, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, setAnimation, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setFadingEdgeLength, setFocusable, setFocusableInTouchMode, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setId, setIsRootNamespace, setKeepScreenOn, setLayoutParams, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnClickListener, setOnCreateContextMenuListener, setOnFocusChangeListener, setOnKeyListener, setOnLongClickListener, setOnTouchListener, setPadding, setPressed, setSaveEnabled, setScrollBarStyle, setSoundEffectsEnabled, setTag, setTouchDelegate, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVisibility, setWillNotCacheDrawing, setWillNotDraw, showContextMenu, startAnimation, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomButton

public ZoomButton(Context context)

ZoomButton

public ZoomButton(Context context,
                  AttributeSet attrs)

ZoomButton

public ZoomButton(Context context,
                  AttributeSet attrs,
                  int defStyle)
Method Detail

onTouchEvent

public boolean onTouchEvent(MotionEvent event)
Description copied from class: View
Implement this method to handle touch screen motion events.

Overrides:
onTouchEvent in class View
Parameters:
event - The motion event.
Returns:
True if the event was handled, false otherwise.

setZoomSpeed

public void setZoomSpeed(long speed)

onLongClick

public boolean onLongClick(View v)
Description copied from interface: View.OnLongClickListener
Called when a view has been clicked and held.

Specified by:
onLongClick in interface View.OnLongClickListener
Parameters:
v - The view that was clicked and held. return True if the callback consumed the long click, false otherwise

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.

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: View
Set the enabled state of this view. The interpretation of the enabled state varies by subclass.

Overrides:
setEnabled in class View
Parameters:
enabled - True if this view is enabled, false otherwise.

dispatchUnhandledMove

public boolean dispatchUnhandledMove(View focused,
                                     int direction)
Description copied from class: View
This method is the last chance for the focused view and its ancestors to respond to an arrow key. This is called when the focused view did not consume the key internally, nor could the view system find a new view in the requested direction to give focus to.

Overrides:
dispatchUnhandledMove in class View
Parameters:
focused - The currently focused view.
direction - The direction focus wants to move. One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT.
Returns:
True if the this view consumed this unhandled move.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature