I have an Activity
with two PopupWindow
, one a popup calculator which works fine, I can only dismiss it via clicking the close button and that is perfect. The second window (we'll call RW) has two EditText
to input numbers, which may be got using the calculator or just known.
My problem is, if I click outside the RW it dismisses, if I change around the attributes it may not dismiss but then I can't fill in the text. I'll attach the appropriate code, but not all of it I can share.
What I need from RW is that I can fill in the EditText
and it does not dismiss when clicking outside of it.
RW:
final PopupWindow popupWindow = new PopupWindow(activity);
popupWindow.setContentView(layout);
popupWindow.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(activity.getApplicationContext(),android.R.color.transparent)));
popupWindow.setFocusable(true);
popupWindow.showAtLocation(layout, Gravity.CENTER,0,0);