danger.lock
Class CustomKeyGuardView

java.lang.Object
  extended by danger.app.Listener
      extended by danger.ui.View
          extended by danger.ui.Container
              extended by danger.lock.CustomKeyGuardView


public abstract class CustomKeyGuardView
extends Container

Override this to create your own custom keyguard screen, complete with anything you want. When you're finished, use SystemLockManager.registerKeyGuardView().


Field Summary
 
Fields inherited from class danger.ui.View
DEFAULT_SCROLL_FOCUS_MARGIN, FOCUS_DEFAULT, FOCUS_DOWNWARD, FOCUS_FROM_NOWHERE, FOCUS_LEFTWARD, FOCUS_NONE, FOCUS_RIGHTWARD, FOCUS_UPWARD, HEIGHT_AUTO, HEIGHT_FILL_TO_BOTTOM, HEIGHT_FILL_TO_TOP, HEIGHT_MATCH_CONTROL, HEIGHT_PERCENTAGE, POSITION_ABOVE, POSITION_ALIGN_BASELINE, POSITION_ALIGN_BOTTOM, POSITION_ALIGN_HORIZONTALLY, POSITION_ALIGN_LEFT, POSITION_ALIGN_PARENT_BOTTOM, POSITION_ALIGN_PARENT_RIGHT, POSITION_ALIGN_PARENT_TOP, POSITION_ALIGN_RIGHT, POSITION_ALIGN_TOP, POSITION_ALIGN_VERTICALLY, POSITION_BELOW, POSITION_BELOW_GROUP_BOX_HEADING, POSITION_CENTER_HORIZONTALLY, POSITION_CENTER_VERTICALLY, POSITION_TO_LEFT, POSITION_TO_RIGHT, PREFER_DIRECTION_NONE, PREFER_HORIZONTAL_DIRECTION, PREFER_VERTICAL_DIRECTION, STATE_AT_AND_SPACE_PAGE, STATE_CAN_FOCUS, STATE_DEBUG_BOUNDS, STATE_ENABLED, STATE_FOCUSED, STATE_MAKE_DING, STATE_PARTIAL_FOCUS_OK, STATE_TRANSPARENT, STATE_VISIBLE, WIDTH_AUTO, WIDTH_FILL_TO_LEFT, WIDTH_FILL_TO_RIGHT, WIDTH_MATCH_CONTROL, WIDTH_PERCENTAGE
 
Constructor Summary
CustomKeyGuardView()
           
 
Method Summary
 boolean blocksSystemSleep()
          Override and return true if you want to prevent the device from entering system sleep during keyguard.
 ResourceDatabase getResources()
          Get the resources of the app that instantiated this class.
 void onEnter()
          Override to have specific code run when your keyguard window is shown.
 void onExit()
          Override to have specific code run when your keyguard window is hidden.
 void setAcceptFocus(boolean accept)
          It is not valid to call setAcceptFocus() here.
 void setHeight(int height)
          It is not valid to call setHeight() here.
 void setSize(int width, int height)
          It is not valid to call setSize() here.
 void setWidth(int width)
          It is not valid to call setWidth() here.
 
Methods inherited from class danger.ui.Container
addChild, addChild, addChildAt, addChildAt, addFromContainerResource, addFromContainerResource, addFromContainerResource, addFromDialogResource, addFromDialogResource, advanceFocus, advanceFocusInWindow, childCount, childIsOnScreen, disable, enable, eventKeyDown, eventKeyHeld, eventKeyRepeat, eventKeyUp, eventPeriodicPulse, eventRawKeyDown, eventRawKeyHeld, eventRawKeyRepeat, eventRawKeyUp, eventShortcut, eventWidgetDown, eventWidgetHeld, eventWidgetUp, focusedDescendantIsValid, getBottomChild, getBottomChild, getChildAt, getChildIndex, getChildWithID, getControlWithID, getDescendantWithID, getFirstChild, getFirstFocusableChild, getFocusableChildInWindow, getFocusedChild, getFocusedLeaf, getInterestingRect, getLastChild, getLastFocusableChild, getLeftMostChild, getNextFocusableChild, getNextFocusableChild, getPageHeight, getPrevFocusableChild, getPrevFocusableChild, getRightMostChild, getRightMostChild, handleButtonShortcut, hideAllChildren, isDescendant, keepRectInView, loseFocus, moveChildToIndex, onChildPositionChanged, onChildSizeChanged, onChildVisibilityChanged, pageToEnd, pageToHome, paint, paintChildren, receiveEvent, reflowChildren, removeAllChildren, removeChild, reverseFocus, setFocusedChild, setFocusedChild, setFocusedChild, setFocusedDescendant, setFocusedDescendant, setFocusedDescendant, setFocusToFirstDescendant, setFormatDateForControlWithID, setFormatDateForTextControlWithID, setFormatTextForControlWithID, setFormatTextForControlWithID, setFormatTextForControlWithID, setFormatTextForControlWithID, setFormatTextForControlWithID, setFormatTextForTextControlWithID, setFormatTextForTextControlWithID, setFormatTextForTextControlWithID, setFormatTextForTextControlWithID, setFormatTextForTextControlWithID, setListenerForAllControls, setReflowAdjustHeight, setWindow, showAllChildren, snapHeightToChildren, snapHeightToChildren, snapToChildren, snapWidthToChildren, snapWidthToChildren, takeFocus, willFocusWithin, willFocusWithin
 
Methods inherited from class danger.ui.View
boundsIntersect, boundsIntersect, canLoseFocus, clear, clear, copyStyle, getAcceptFocus, getBackgroundColor, getBottom, getBounds, getBounds, getData, getFocusTraversalDirection, getFocusTraversalFrom, getFocusTraversalPolicy, getFrame, getFrame, getGlobalBottom, getGlobalLeft, getGlobalRight, getGlobalTop, getHeight, getID, getInterestingRect, getLabelFont, getLabelFont, getLeft, getOrigin, getOrigin, getOriginX, getOriginY, getParent, getParentContainer, getPartialFocusOK, getRight, getScrollFocusMargin, getSibling, getState, getStyle, getStyleColor, getStyleFont, getTop, getWidth, getWindow, globalToLocal, globalToLocalH, globalToLocalV, hide, invalidate, invalidate, invalidate, invalidateIndependentOfOrigin, invalidateIndependentOfOrigin, isEnabled, isFocusable, isFocused, isObscured, isOnScreen, isTransparent, isVisible, isVisibleInHierarchy, isVisibleOnScreen, justSetVisible, localToGlobal, localToGlobal, localToGlobalH, localToGlobalV, localToWindow, moveBy, notifyWhenFocusChanges, notifyWhenObscurityChanges, notifyWhenParentSizeChanges, notifyWhenPositionChanges, notifyWhenSizeChanges, notifyWhenVisibilityChanges, offsetOrigin, offsetOrigin, onAddedToParent, onDecoded, onEnabledStateChanged, onHide, onPeriodicPulse, onPositionChanged, onRemovedFromParent, onShortcut, onShortcut, onShortcutConsumed, onShow, onSizeChanged, onStyleChanged, onSystemFontChanged, onViewFocusChanged, onViewObscurityChanged, onViewPositionChanged, onViewSizeChanged, onViewVisibilityChanged, onWindowPaint, playLimitSound, receiveEventInternal, resetOrigin, sendEventToWindow, setAtAndSpacePage, setBackground, setBackgroundColor, setBottom, setData, setDebugBounds, setDynamicHeight, setDynamicPosition, setDynamicWidth, setEnabled, setFocusTraversalDirection, setFocusTraversalFrom, setFocusTraversalPolicy, setFrame, setKeyedValue, setLabelFont, setLeft, setMakeLimitNoise, setOrigin, setOrigin, setPartialFocusOK, setPosition, setPreferredDirection, setRight, setScrollFocusMargin, setStyle, setStyleColor, setStyleFont, setStyleFrameColor, setTop, setTransparent, setVisible, shouldDropEvent, show, showContextMenu, styleIsDefault, swapStyleColors, windowToLocal
 
Methods inherited from class danger.app.Listener
cancelEvents, childEventPump, childEventPumpDone, eventProblem, isDispatchingThread, sendEvent, sendEvent, sendEvent, sendEvent, sendEvent, sendLowPriorityEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomKeyGuardView

public CustomKeyGuardView()
Method Detail

blocksSystemSleep

public boolean blocksSystemSleep()
Override and return true if you want to prevent the device from entering system sleep during keyguard. Useful if you have a super-cool animation or other regularly updating feature you want to preserve. Power management is for the birds!


getResources

public final ResourceDatabase getResources()
Get the resources of the app that instantiated this class. This is important because subclasses will be used by the SystemLock app and won't have direct access to their own resources.


setSize

public final void setSize(int width,
                          int height)
It is not valid to call setSize() here.

Overrides:
setSize in class View

setWidth

public final void setWidth(int width)
It is not valid to call setWidth() here.

Overrides:
setWidth in class View

setHeight

public final void setHeight(int height)
It is not valid to call setHeight() here.

Overrides:
setHeight in class View

setAcceptFocus

public final void setAcceptFocus(boolean accept)
It is not valid to call setAcceptFocus() here.

Overrides:
setAcceptFocus in class View

onEnter

public void onEnter()
Override to have specific code run when your keyguard window is shown.


onExit

public void onExit()
Override to have specific code run when your keyguard window is hidden.