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 ofAccessibilityWindowInfothat allows a test to set properties that are locked in the original class.
-
-
Constructor Summary
Constructors Constructor Description ShadowAccessibilityWindowInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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()
-
-
-
Method Detail
-
__constructor__
@Implementation protected void __constructor__()
-
obtain
@Implementation protected static AccessibilityWindowInfo obtain()
-
obtain
@Implementation protected static AccessibilityWindowInfo obtain(AccessibilityWindowInfo window)
-
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
public boolean deepEquals(Object object)
-
hashCode
@Implementation public int hashCode()
-
getType
@Implementation protected int getType()
-
getChildCount
@Implementation protected int getChildCount()
-
getChild
@Implementation protected AccessibilityWindowInfo getChild(int index)
-
getParent
@Implementation protected AccessibilityWindowInfo getParent()
-
getRoot
@Implementation protected AccessibilityNodeInfo getRoot()
-
getAnchor
@Implementation(minSdk=24) protected AccessibilityNodeInfo getAnchor()
-
isActive
@Implementation protected boolean isActive()
-
getId
@Implementation protected int getId()
-
getBoundsInScreen
@Implementation protected void getBoundsInScreen(Rect outBounds)
-
getLayer
@Implementation protected int getLayer()
-
getTitle
@Implementation(minSdk=24) protected CharSequence getTitle()
Returns the title of this window, ornullif none is available.
-
isFocused
@Implementation protected boolean isFocused()
-
isAccessibilityFocused
@Implementation protected boolean isAccessibilityFocused()
-
recycle
@Implementation protected void recycle()
-
setRoot
public void setRoot(AccessibilityNodeInfo root)
-
setAnchor
public void setAnchor(AccessibilityNodeInfo anchor)
-
setType
@Implementation public void setType(int value)
-
setBoundsInScreen
@Implementation(maxSdk=29) public void setBoundsInScreen(Rect bounds)
-
setAccessibilityFocused
@Implementation public void setAccessibilityFocused(boolean value)
-
setActive
@Implementation public void setActive(boolean value)
-
setId
@Implementation public void setId(int value)
-
setLayer
@Implementation public void setLayer(int value)
-
setTitle
@Implementation(minSdk=24) public void setTitle(CharSequence value)
Sets the title of this window.- Parameters:
value- TheCharSequenceto set as the title of this window
-
setFocused
@Implementation public void setFocused(boolean focused)
-
addChild
public void addChild(AccessibilityWindowInfo child)
-
toString
@Implementation public String toString()
-
-