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 java.lang.ObjectShadow 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(android.view.accessibility.AccessibilityWindowInfo child)static booleanareThereUnrecycledWindows(boolean printUnrecycledWindowsToSystemErr)Check for leaked objects that wereobtained but neverrecycled.booleandeepEquals(java.lang.Object object)protected voidgetBoundsInScreen(android.graphics.Rect outBounds)protected android.view.accessibility.AccessibilityWindowInfogetChild(int index)protected intgetChildCount()protected intgetId()protected intgetLayer()protected android.view.accessibility.AccessibilityWindowInfogetParent()protected android.view.accessibility.AccessibilityNodeInfogetRoot()protected java.lang.CharSequencegetTitle()Returns the title of this window, ornullif none is available.protected intgetType()inthashCode()protected booleanisAccessibilityFocused()protected booleanisActive()protected booleanisFocused()protected static android.view.accessibility.AccessibilityWindowInfoobtain()protected static android.view.accessibility.AccessibilityWindowInfoobtain(android.view.accessibility.AccessibilityWindowInfo window)protected voidrecycle()static voidresetObtainedInstances()Clear list of obtained instance objects.voidsetAccessibilityFocused(boolean value)voidsetActive(boolean value)voidsetBoundsInScreen(android.graphics.Rect bounds)voidsetFocused(boolean focused)voidsetId(int value)voidsetLayer(int value)voidsetRoot(android.view.accessibility.AccessibilityNodeInfo root)voidsetTitle(java.lang.CharSequence value)Sets the title of this window.voidsetType(int value)java.lang.StringtoString()
-
-
-
Method Detail
-
__constructor__
@Implementation protected void __constructor__()
-
obtain
@Implementation protected static android.view.accessibility.AccessibilityWindowInfo obtain()
-
obtain
@Implementation protected static android.view.accessibility.AccessibilityWindowInfo obtain(android.view.accessibility.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(java.lang.Object object)
-
hashCode
@Implementation public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getType
@Implementation protected int getType()
-
getChildCount
@Implementation protected int getChildCount()
-
getChild
@Implementation protected android.view.accessibility.AccessibilityWindowInfo getChild(int index)
-
getParent
@Implementation protected android.view.accessibility.AccessibilityWindowInfo getParent()
-
getRoot
@Implementation protected android.view.accessibility.AccessibilityNodeInfo getRoot()
-
isActive
@Implementation protected boolean isActive()
-
getId
@Implementation protected int getId()
-
getBoundsInScreen
@Implementation protected void getBoundsInScreen(android.graphics.Rect outBounds)
-
getLayer
@Implementation protected int getLayer()
-
getTitle
@Implementation(minSdk=24) protected java.lang.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(android.view.accessibility.AccessibilityNodeInfo root)
-
setType
public void setType(int value)
-
setBoundsInScreen
public void setBoundsInScreen(android.graphics.Rect bounds)
-
setAccessibilityFocused
public void setAccessibilityFocused(boolean value)
-
setActive
public void setActive(boolean value)
-
setId
public void setId(int value)
-
setLayer
public void setLayer(int value)
-
setTitle
public void setTitle(java.lang.CharSequence value)
Sets the title of this window.- Parameters:
value- TheCharSequenceto set as the title of this window
-
setFocused
public void setFocused(boolean focused)
-
addChild
public void addChild(android.view.accessibility.AccessibilityWindowInfo child)
-
toString
@Implementation public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-