Package org.robolectric.shadows
Class ShadowWindow
java.lang.Object
org.robolectric.shadows.ShadowWindow
- Direct Known Subclasses:
ShadowPhoneWindow
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addOnFrameMetricsAvailableListener
(Window.OnFrameMetricsAvailableListener listener, Handler handler) protected void
addPrivateFlags
(int flags) protected void
addSystemFlags
(int flags) static Window
boolean
getFlag
(int flag) boolean
getPrivateFlag
(int flag) Return the value from a private flag (a.k.a system flag).int
getTitle()
protected void
void
reportOnFrameMetricsAvailable
(FrameMetrics frameMetrics) CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()
on each current listener with 0 as the dropCountSinceLastInvocation.void
reportOnFrameMetricsAvailable
(FrameMetrics frameMetrics, int dropCountSinceLastInvocation) CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()
on each current listener.protected void
setFlags
(int flags, int mask) protected void
setSoftInputMode
(int softInputMode)
-
Field Details
-
title
-
backgroundDrawable
-
-
Constructor Details
-
ShadowWindow
public ShadowWindow()
-
-
Method Details
-
create
- Throws:
ClassNotFoundException
-
setFlags
-
addSystemFlags
-
addPrivateFlags
-
setSoftInputMode
-
getFlag
public boolean getFlag(int flag) -
getPrivateFlag
public boolean getPrivateFlag(int flag) Return the value from a private flag (a.k.a system flag).Private flags can be set via either
addPrivateFlags(int)
(SDK 19-30) oraddSystemFlags(int)
(SDK 29+) methods. -
getTitle
-
getSoftInputMode
public int getSoftInputMode() -
getBackgroundDrawable
-
addOnFrameMetricsAvailableListener
@Implementation(minSdk=24) protected void addOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener, Handler handler) -
removeOnFrameMetricsAvailableListener
@Implementation(minSdk=24) protected void removeOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener) -
reportOnFrameMetricsAvailable
CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()
on each current listener with 0 as the dropCountSinceLastInvocation. -
reportOnFrameMetricsAvailable
public void reportOnFrameMetricsAvailable(FrameMetrics frameMetrics, int dropCountSinceLastInvocation) CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()
on each current listener.- Parameters:
frameMetrics
- theFrameMetrics
instance passed to the listeners.dropCountSinceLastInvocation
- the dropCountSinceLastInvocation passed to the listeners.
-