Package org.robolectric.shadows
Class ShadowWindowManagerGlobal
java.lang.Object
org.robolectric.shadows.ShadowWindowManagerGlobal
@Implements(value=android.view.WindowManagerGlobal.class,
isInAndroidSdk=false)
public class ShadowWindowManagerGlobal
extends Object
Shadow for
WindowManagerGlobal
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Ongoing predictive back gesture. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clears the data returned bygetLastDragClipData()
.static boolean
static ClipData
Returns the lastClipData
passed to a drag initiated from a call toView.startDrag(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int)
orView.startDragAndDrop(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int)
, or null if there isn't one.static Object
protected static IWindowSession
protected static IWindowSession
static void
reset()
startPredictiveBackGesture
(int edge) Starts a predictive back gesture in the center of the edge.startPredictiveBackGesture
(int edge, float position) Starts a predictive back gesture.
-
Constructor Details
-
ShadowWindowManagerGlobal
public ShadowWindowManagerGlobal()
-
-
Method Details
-
reset
-
getInTouchMode
public static boolean getInTouchMode() -
getLastDragClipData
Returns the lastClipData
passed to a drag initiated from a call toView.startDrag(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int)
orView.startDragAndDrop(android.content.ClipData, android.view.View.DragShadowBuilder, java.lang.Object, int)
, or null if there isn't one. -
clearLastDragClipData
public static void clearLastDragClipData()Clears the data returned bygetLastDragClipData()
. -
startPredictiveBackGesture
Starts a predictive back gesture in the center of the edge. SeestartPredictiveBackGesture(int, float)
. -
startPredictiveBackGesture
public static ShadowWindowManagerGlobal.PredictiveBackGesture startPredictiveBackGesture(int edge, float position) Starts a predictive back gesture.If no active activity with a back pressed callback that supports animations is registered then null will be returned. See
ShadowWindowManagerGlobal.PredictiveBackGesture
.See
ShadowApplication.setEnableOnBackInvokedCallback(boolean)
.- Parameters:
position
- The position on edge of the window
-
getWindowSession
-
peekWindowSession
-
getWindowManagerService
- Throws:
RemoteException
-