Android PopUp Floating Window Tutorial


Yong Loon Ng

Ng Yong Loon, better known as Kristofer is a software engineer and computer scientist who doubles up as an entrepreneur.

You may also like...

3 Responses

  1. inon says:


    I tried to implement this popup as you did exactly.
    my app falls at this line:
    ——> popupView = layoutInflater.inflate(R.layout.popup,null);
    Do you know why? or how can i figure it out?

  2. Daniel says:

    TKS, that works very fine. Simple and complete.
    I just made a little change.

    I moved this hole part out of the click event:
    LayoutInflater layoutInflater =(LayoutInflater)getBaseContext().getSystemService(LAYOUT_INFLATER_SERVICE);
    popupView = layoutInflater.inflate(R.layout.popup,null);
    popupWindow = new PopupWindow(popupView, RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);

    Inside the click event, it was intancing a new popupWindow on each click, even if there was some one up. And the close button was clossing just the last instance.

  3. Mayank Choudhary says:

    VideoView Is not working in this PopUp window..??
    Nothing shows ,no any popUps.

Leave a Reply

Your email address will not be published. Required fields are marked *