I have a Activity
and implement PopupWindow
class for a apps alert view.
My excepted case is the popupwindow is shown and pressed the device back button that will be called another action.
I tried to implement the onBackPressed
in my Activity. But the popupwindow is shown, onBackPressed
won't call. When I dismissed the popupwindow, the onBackPressed
is called.
So anyone know how can implement the back button method in my case. Thanks.
@Override
public void onBackPressed() {
super.onBackPressed();
}