A window that appears ('pops up', hence the name) when you select an option with a mouse or press a designated function key. Usually, the pop-up window contains a menu of commands and stays on the screen only until you select one of the commands. It then disappears.
Questions tagged [popupwindow]
1754 questions
210
votes
17 answers
Add a UIView above all, even the navigation bar
I want to display, above any other views, even the navigation bar, a kind of "pop-up" view that looks like this:
full screen black background with a 0.5 alpha to see the other UIViewController underneath.
a UIView window in the middle with some…

Nicolas Roy
- 3,773
- 5
- 27
- 42
113
votes
15 answers
PopupWindow - Dismiss when clicked outside
I have a PopupWindow on my activity, the thing is my PopupWindow still shows even when I'm interacting with my activity (say scrolling on my list). I can scroll through my list and the PopupWindow is still there.
What I want to achieve is when I'm…

lorraine batol
- 6,001
- 16
- 55
- 114
92
votes
12 answers
Blur or dim background when Android PopupWindow active
I would like to be able to either blur or dim the background when I show my popup window using popup.showAtLocation, and unblur/dim the background when popup.dismiss is called.
I have tried applying layout params FLAG_BLUR_BEHIND and FLAG_DIM_BEHIND…

k_day
- 1,379
- 2
- 14
- 19
76
votes
8 answers
How to create a popup window (PopupWindow) in Android
To create a simple working PopupWindow, we need to do the following:
popup_example.xml:

jennifer
- 8,133
- 22
- 69
- 96
63
votes
11 answers
Android popup window dismissal
I have a popup window displaying when I click an item in my list activity. The problem is that the back key doesn't close it. I tried catching the back key in my list activity but it doesn't register it...then I tried registering a onkeylistener to…

Bostjan
- 1,397
- 3
- 21
- 36
60
votes
8 answers
Android PopupWindow with Tooltip Arrow
I've seen a lot of questions about removing the border of a PopupWindow by passing null or new Drawable() to setBackgroundDrawable(). I'm having the opposite problem. I want a border around my PopupWindow, preferably with a tooltip arrow pointing…

Lee
- 1,028
- 2
- 11
- 18
56
votes
14 answers
Problems creating a Popup Window in Android Activity
I'm trying to create a popup window that only appears the first time the application starts. I want it to display some text and have a button to close the popup. However, I'm having troubles getting the PopupWindow to even work. I've tried two…

Amplify91
- 2,690
- 5
- 24
- 32
54
votes
15 answers
onAnimationEnd is not getting called, onAnimationStart works fine
I've a ScrollView in the PopupWindow. I'm animating ScrollView contents using TranslateAnimation.
When animation starts, the onAnimationStart listener is called but the onAnimationEnd is not getting called. Any ideas ?
Layout :

Karan
- 12,724
- 6
- 40
- 33
46
votes
2 answers
sendUserActionEvent() returned
I got the following error when a popup dismisses using android studio. The code works OK, but the following error appears on logcat:
E/ViewRootImpl: sendUserActionEvent() returned.
java code:
LayoutInflater layoutInflater =…

Soheil Ghasemi
- 461
- 4
- 4
43
votes
9 answers
ListPopupWindow not obeying WRAP_CONTENT width spec
I'm trying to use ListPopupWindow to show a list of strings via an ArrayAdapter (eventually this will be a more complex custom adapter). Code is below. As shown in the screenshot, the resulting ListPopupWindow seems to act as if the content width is…

Karakuri
- 38,365
- 12
- 84
- 104
41
votes
3 answers
Open new tab without popup blocker after ajax call on user click
I have a page that enable user to perform image manipulation via HTML5 canvas, on the page, there's a facebook share button for sharing a generated image of the canvas on facebook.
When the link is clicked, an ajax request is sent to the server…

Syma
- 574
- 1
- 4
- 11
33
votes
2 answers
ViewPager with Fragments inside PopupWindow (or DialogFragment) - Error no view found for id for fragment
I created a FragmentActivity with this code below
public class Activity_principal1 extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
…

groff07
- 2,363
- 3
- 32
- 48
33
votes
11 answers
Android - PopupWindow above a specific view
I am developing an application for Android and I am using a popup window when the user clicks a specific menu bar object(consisting of small images lined up horizontally) on the bottom of the screen.
On the click I want the popup window to be…

Matt
- 1,017
- 2
- 11
- 27
32
votes
3 answers
How to show PopupWindow at special location?
I need to show PopupWindow under one Views shown on the screen.
How can I calculate coordinates of needed View and place PopupWindow under it? Code example are more than welcome. Thanks.

Eugene
- 59,186
- 91
- 226
- 333
31
votes
3 answers
When to use Android PopupWindow vs Dialog
I'm unclear about when to use PopupWindow vs Dialog. Any insight would be much appreciated. Thanks.

Julian A.
- 10,928
- 16
- 67
- 107