I have a popup window in my Android application that does not follow the behavior I want. I can create the popup window as an anchor from a view and it closes when I touch out of the popup area. But I am unable to perform any actions with this click that only closes the popup window.
I would like be be able to dismiss the popup window and click another view with the SAME click. Does anyone know how to achieve this??
The code for the popup window is below:
//Get the instance of the LayoutInflater
LayoutInflater inflater = (LayoutInflater) Page_Activity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.popup,(ViewGroup) findViewById(R.id.popup_element));
//Initialize popup window size and attributes
popup_window = new PopupWindow(layout, 300, 210, true);
popup_window.setOutsideTouchable(true);
popup_window.setTouchable(true);
popup_window.setBackgroundDrawable(new BitmapDrawable());
//Show popup window
popup_window.showAsDropDown(anchor);