
org.robolectric.shadows.ShadowListPopupWindow Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import android.widget.ListPopupWindow;
import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import static org.robolectric.Shadows.shadowOf;
import static org.robolectric.shadow.api.Shadow.directlyOn;
@Implements(ListPopupWindow.class)
public class ShadowListPopupWindow {
@RealObject
private ListPopupWindow realListPopupWindow;
@Implementation
public void show() {
shadowOf(RuntimeEnvironment.application).setLatestListPopupWindow(realListPopupWindow);
directlyOn(realListPopupWindow, ListPopupWindow.class).show();
}
public static ListPopupWindow getLatestListPopupWindow() {
return shadowOf(RuntimeEnvironment.application).getLatestListPopupWindow();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy