0

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);
Matt
  • 1,017
  • 2
  • 11
  • 27
  • AFAIK this is as designed, and this is how a user would expect it to work like.. May be someone on SO would answer.. – Varun Jun 18 '13 at 20:43
  • popup dialog that contain two button , one for yes and one for no will help you ? this what you need ? – idan Jun 18 '13 at 20:43
  • it is a painting app with a canvas in the background. I have a popup window for the user to choose colors. I would like to be able to choose a color from the popup window and touch the canvas and be able to draw. Right now the user chooses a color, has to tap the screen (to exit the popup window) and then is able to draw. – Matt Jun 18 '13 at 20:48

0 Answers0