Immersive sticky mode doesn't seem to work when pop-ups are used in an Android app. Status and navigation bars focus on ascent time. Although I was able to reset using the System UI flags for Alert dialogs to avoid this behavior, I'm not sure how to do this for pop-ups. Can anyone help?
This is how I create my popup:
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 cannot access getWindow (). setFlags or getWindow (). getDecorView for the popup.
Appreciate any help with this!
Thanks!
source share