Package org.robolectric.shadows
Class ShadowAccessibilityWindowInfo
java.lang.Object
org.robolectric.shadows.ShadowAccessibilityWindowInfo
@Implements(value=android.view.accessibility.AccessibilityWindowInfo.class, minSdk=21) 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 Constructor Description ShadowAccessibilityWindowInfo() -
Method Summary
Modifier and Type Method Description protected void__constructor__()voidaddChild(AccessibilityWindowInfo child)static booleanareThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)Check for leaked objects that wereobtained but neverrecycled.booleandeepEquals(Object object)protected AccessibilityNodeInfogetAnchor()protected voidgetBoundsInScreen(Rect outBounds)protected AccessibilityWindowInfogetChild(int index)protected intgetChildCount()protected intgetId()protected intgetLayer()protected AccessibilityWindowInfogetParent()protected AccessibilityNodeInfogetRoot()protected CharSequencegetTitle()Returns the title of this window, ornullif none is available.protected intgetType()inthashCode()protected booleanisAccessibilityFocused()protected booleanisActive()protected booleanisFocused()protected static AccessibilityWindowInfoobtain()protected static AccessibilityWindowInfoobtain(AccessibilityWindowInfo window)protected voidrecycle()static voidresetObtainedInstances()Clear 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)voidsetRoot(AccessibilityNodeInfo root)voidsetTitle(CharSequence value)Sets the title of this window.voidsetType(int value)StringtoString()
-
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
-
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
-
addChild
-
toString
-