Package org.robolectric.shadows
Class ShadowWindow
java.lang.Object
org.robolectric.shadows.ShadowWindow
- Direct Known Subclasses:
ShadowPhoneWindow
@Implements(android.view.Window.class) public class ShadowWindow extends Object
-
Field Summary
Fields Modifier and Type Field Description protected Drawable
backgroundDrawable
protected CharSequence
title
-
Constructor Summary
Constructors Constructor Description ShadowWindow()
-
Method Summary
Modifier and Type Method Description protected void
addOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener, Handler handler)
static Window
create(Context context)
Drawable
getBackgroundDrawable()
boolean
getFlag(int flag)
ProgressBar
getIndeterminateProgressBar()
ProgressBar
getProgressBar()
int
getSoftInputMode()
CharSequence
getTitle()
protected void
removeOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener)
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
-
Constructor Details
-
ShadowWindow
public ShadowWindow()
-
-
Method Details
-
create
- Throws:
ClassNotFoundException
-
setFlags
-
setSoftInputMode
-
getFlag
public boolean getFlag(int flag) -
getTitle
-
getSoftInputMode
public int getSoftInputMode() -
getBackgroundDrawable
-
getProgressBar
-
getIndeterminateProgressBar
-
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.
-