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 DrawablebackgroundDrawableprotected CharSequencetitle
-
Constructor Summary
Constructors Constructor Description ShadowWindow()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener, Handler handler)static Windowcreate(Context context)DrawablegetBackgroundDrawable()booleangetFlag(int flag)ProgressBargetIndeterminateProgressBar()ProgressBargetProgressBar()intgetSoftInputMode()CharSequencegetTitle()protected voidremoveOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener)voidreportOnFrameMetricsAvailable(FrameMetrics frameMetrics)CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()on each current listener with 0 as the dropCountSinceLastInvocation.voidreportOnFrameMetricsAvailable(FrameMetrics frameMetrics, int dropCountSinceLastInvocation)CallsWindow.OnFrameMetrisAvailableListener#onFrameMetricsAvailable()on each current listener.protected voidsetFlags(int flags, int mask)protected voidsetSoftInputMode(int softInputMode)
-
-
-
Field Detail
-
title
protected CharSequence title
-
backgroundDrawable
protected Drawable backgroundDrawable
-
-
Method Detail
-
setFlags
@Implementation protected void setFlags(int flags, int mask)
-
setSoftInputMode
@Implementation protected void setSoftInputMode(int softInputMode)
-
getFlag
public boolean getFlag(int flag)
-
getTitle
public CharSequence getTitle()
-
getSoftInputMode
public int getSoftInputMode()
-
getBackgroundDrawable
public Drawable getBackgroundDrawable()
-
getProgressBar
public ProgressBar getProgressBar()
-
getIndeterminateProgressBar
public ProgressBar getIndeterminateProgressBar()
-
addOnFrameMetricsAvailableListener
@Implementation(minSdk=24) protected void addOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener, Handler handler)
-
removeOnFrameMetricsAvailableListener
@Implementation(minSdk=24) protected void removeOnFrameMetricsAvailableListener(Window.OnFrameMetricsAvailableListener listener)
-
reportOnFrameMetricsAvailable
public void reportOnFrameMetricsAvailable(FrameMetrics frameMetrics)
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- theFrameMetricsinstance passed to the listeners.dropCountSinceLastInvocation- the dropCountSinceLastInvocation passed to the listeners.
-
-