Immersive sticky mode does not seem to work when popup windows are used in an android app. The status and nav bars do come into focus for the duration of the pop up. While i was able to reset the System UI flags for Alert dialogs to avoid this behavior, i am not sure how to do this for Popup windows. Can some one help?
Here is how I create my popup window:
LayoutInflater layoutInflater = (LayoutInflater) getActivity().getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View popUpView = layoutInflater.inflate(R.layout.popup_image_selector, null);
DisplayMetrics displayMetrics = getActivity().getApplicationContext().getResources().getDisplayMetrics();
int width = displayMetrics.widthPixels;
int height = displayMetrics.heightPixels;
final PopupWindow popUp = new PopupWindow(popUpView,(int) (width*0.66), (int)(height*.20));
popUp.setFocusable(true);
popUp.setOutsideTouchable(true);
popUp.setContentView(popUpView);
popUp.showAtLocation(imageContent, Gravity.BOTTOM, 0, (int)(height*.20));
Where can I set the System UI flags as I am not able to access getWindow().setFlags or getWindow().getDecorView for popup window.
Appreciate any help on this!
Thanks!