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__()
void
addChild(AccessibilityWindowInfo child)
static boolean
areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)
Check for leaked objects that wereobtain
ed but neverrecycle
d.boolean
deepEquals(Object object)
protected AccessibilityNodeInfo
getAnchor()
protected void
getBoundsInScreen(Rect outBounds)
protected AccessibilityWindowInfo
getChild(int index)
protected int
getChildCount()
protected int
getId()
protected int
getLayer()
protected AccessibilityWindowInfo
getParent()
protected AccessibilityNodeInfo
getRoot()
protected CharSequence
getTitle()
Returns the title of this window, ornull
if none is available.protected int
getType()
int
hashCode()
protected boolean
isAccessibilityFocused()
protected boolean
isActive()
protected boolean
isFocused()
protected boolean
isInPictureInPictureMode()
protected static AccessibilityWindowInfo
obtain()
protected static AccessibilityWindowInfo
obtain(AccessibilityWindowInfo window)
protected void
recycle()
static void
resetObtainedInstances()
Clear list of obtained instance objects.void
setAccessibilityFocused(boolean value)
void
setActive(boolean value)
void
setAnchor(AccessibilityNodeInfo anchor)
void
setBoundsInScreen(Rect bounds)
void
setFocused(boolean focused)
void
setId(int value)
void
setLayer(int value)
void
setPictureInPicture(boolean pictureInPicture)
void
setRoot(AccessibilityNodeInfo root)
void
setTitle(CharSequence value)
Sets the title of this window.void
setType(int value)
String
toString()
-
Constructor Details
-
ShadowAccessibilityWindowInfo
public ShadowAccessibilityWindowInfo()
-
-
Method Details
-
__constructor__
-
obtain
-
obtain
-
resetObtainedInstances
public static void resetObtainedInstances()Clear list of obtained instance objects.areThereUnrecycledWindows
will always return false if called immediately afterwards. -
areThereUnrecycledWindows
public static boolean areThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)Check for leaked objects that wereobtain
ed but neverrecycle
d.- Parameters:
printUnrecycledWindowsToSystemErr
- - if true, stack traces of calls toobtain
that lack matching calls torecycle
are dumped to System.err.- Returns:
true
if there are unrecycled windows
-
deepEquals
-
hashCode
-
getType
-
getChildCount
-
getChild
-
getParent
-
getRoot
-
getAnchor
-
isActive
-
getId
-
getBoundsInScreen
-
getLayer
-
getTitle
Returns the title of this window, ornull
if none is available. -
isFocused
-
isAccessibilityFocused
-
isInPictureInPictureMode
-
recycle
-
setRoot
-
setAnchor
-
setType
-
setBoundsInScreen
-
setAccessibilityFocused
-
setActive
-
setId
-
setLayer
-
setTitle
Sets the title of this window.- Parameters:
value
- TheCharSequence
to set as the title of this window
-
setFocused
-
setPictureInPicture
-
addChild
-
toString
-