Package org.robolectric.shadows
Class ShadowAccessibilityWindowInfo
java.lang.Object
org.robolectric.shadows.ShadowAccessibilityWindowInfo
@Implements(android.view.accessibility.AccessibilityWindowInfo.class)
public class ShadowAccessibilityWindowInfo
extends Object
Shadow of
AccessibilityWindowInfo that allows a test to set
properties that are locked in the original class.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidaddChild(AccessibilityWindowInfo child) static booleanareThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr) Check for leaked objects that wereobtained but neverrecycled.booleandeepEquals(Object object) protected AccessibilityNodeInfoprotected voidgetBoundsInScreen(Rect outBounds) protected AccessibilityWindowInfogetChild(int index) protected intprotected intgetId()protected intgetLayer()protected AccessibilityWindowInfoprotected AccessibilityNodeInfogetRoot()protected CharSequencegetTitle()Returns the title of this window, ornullif none is available.protected intgetType()inthashCode()protected booleanprotected booleanisActive()protected booleanprotected booleanprotected static AccessibilityWindowInfoobtain()protected static AccessibilityWindowInfoobtain(AccessibilityWindowInfo window) protected voidrecycle()static voidClear list of obtained instance objects.voidsetAccessibilityFocused(boolean value) voidsetActive(boolean value) voidsetAnchor(AccessibilityNodeInfo anchor) voidsetBoundsInScreen(Rect bounds) voidsetFocused(boolean focused) voidsetId(int value) voidsetLayer(int value) voidsetPictureInPicture(boolean pictureInPicture) voidsetRoot(AccessibilityNodeInfo root) voidsetTitle(CharSequence value) Sets the title of this window.voidsetType(int value) toString()
-
Constructor Details
-
ShadowAccessibilityWindowInfo
public ShadowAccessibilityWindowInfo()
-
-
Method Details
-
__constructor__
-
obtain
-
obtain
-
resetObtainedInstances
public static void resetObtainedInstances()Clear list of obtained instance objects.areThereUnrecycledWindowswill always return false if called immediately afterwards. -
areThereUnrecycledWindows
public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr) Check for leaked objects that wereobtained but neverrecycled.- Parameters:
printUnrecycledWindowsToSystemErr- - if true, stack traces of calls toobtainthat lack matching calls torecycleare dumped to System.err.- Returns:
trueif there are unrecycled windows
-
deepEquals
-
hashCode
-
getType
-
getChildCount
-
getChild
-
getParent
-
getRoot
-
getAnchor
-
isActive
-
getId
-
getBoundsInScreen
-
getLayer
-
getTitle
Returns the title of this window, ornullif none is available. -
isFocused
-
isAccessibilityFocused
-
isInPictureInPictureMode
-
recycle
-
setRoot
-
setAnchor
-
setType
-
setBoundsInScreen
-
setAccessibilityFocused
-
setActive
-
setId
-
setLayer
-
setTitle
Sets the title of this window.- Parameters:
value- TheCharSequenceto set as the title of this window
-
setFocused
-
setPictureInPicture
-
addChild
-
toString
-