Questions tagged [android-popupwindow]

The popupWindow is an AndroidView Container displayed on top of the current activity to show any view.

JavaDoc: http://developer.android.com/reference/android/widget/PopupWindow.html

348 questions
87
votes
11 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,309
  • 2
  • 14
  • 19
64
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
  • 7,597
  • 22
  • 65
  • 95
51
votes
3 answers

Is there a simple example of the PopupWindow class using Android v2.0?

I looked online and was not able to find a working example of the PopupWindow class. The code examples I found online either compile but do not work, or are using methods which have since been removed (such as Activity.getViewInflate()). Is there a…
Todd
  • 1,876
  • 2
  • 16
  • 21
49
votes
4 answers

how to make animation for popup window in android

I hava a popup window in my application, its appears when some button clicked I want to set fade in animation to this window, I put the xml file in "res/anim" folder and set the animation style for the popup window but the animation does not work?…
Ishaq
  • 501
  • 1
  • 4
  • 6
35
votes
3 answers

Android PopupWindow elevation does not show shadow

Android PopupWindow does not show shadows when the elevation is set. It appears to support it from the documentation. I am using 5.0 Lollipop. Creating the popup as follows: popupWindow = new PopupWindow(context); …
Patrick
  • 14,618
  • 20
  • 77
  • 136
23
votes
2 answers

TextInputLayout: RuntimeException - Failed to resolve attribute at index 24

I keep on getting this error when I try to setErrorEnabled on my textInputLayout : 03-12 12:29:03.206 5706-5706/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.myapp, PID: 5706 …
Simon
  • 18,312
  • 22
  • 130
  • 197
21
votes
3 answers

How to achieve custom dialog at the bottom of the screen in Android

Which component do I choose to achieve custom dialog at the bottom as shown in the below image? Shall I choose alertdialog,popupwindow, or fragmentdialog?
19
votes
2 answers

Should I use a PopupWindow or DialogFragment for accepting input?

I am doing a Popup with 3 Spinners and an EditText. After reading many blogs and articles I can't decide which is the best option, PopupWindow or DialogFragment. The criteria would be: Compatibility with different Android's versions Performance If…
eyyo
  • 960
  • 2
  • 11
  • 25
18
votes
3 answers

How to open Draw Overlay permission popup in MIUI?

I want to open this permission popup in MIUI. I have tried this code, but this will not open permission manager popup for a particular app. public static Intent toPermissionManager(Context context, String packageName) { Intent intent = new…
Sagar
  • 555
  • 8
  • 23
16
votes
7 answers

PopupWindow - not working on a few devices

I use following code to show a small popup: public static PopupWindow showImportMenu(Activity activity, View anchor, PopupWindowClickListener onClickListener) { LayoutInflater inflater = LayoutInflater.from(activity); PopupImportBinding…
prom85
  • 14,805
  • 15
  • 98
  • 206
16
votes
2 answers

How to correctly show a popup menu below a TextView, similar to Spinner?

Background I had to create a spinner-like view, which has this behavior: textView that has the selected item text in it, with an arrow icon on the right that indicates whether it's in "open" state. upon clicking the view, a popup menu appears below…
android developer
  • 106,412
  • 122
  • 641
  • 1,128
16
votes
2 answers

Android popup window not filling screen size?

I am trying to make a simple pop up window. But every time I make one, it ends up being super small...and not the length I want it to be. This is how the pop up looks: Here is my layout for the pop up:
TheQ
  • 1,770
  • 6
  • 33
  • 60
14
votes
4 answers

PopupWindow getting clipped on custom keyboard for Android API 28

I made a custom keyboard. When you long press a key, a PopupWindow shows some extra choices above the key. The problem is that in API 28, this popup gets clipped (or even completely hidden for the top row). I had solved this problem for API < 28…
Suragch
  • 364,799
  • 232
  • 1,155
  • 1,198
12
votes
6 answers

dismiss the popup window by back button

I want to Dismiss the popup window by clicking outside of the popup window or by the back button, but when click on the back button my application exit's, instead of exiting the application I want to close the popup window. here is my…
akky777
  • 403
  • 2
  • 6
  • 22
11
votes
2 answers

Android Listview in PopupWindow onitemclick not work on some device

My ListView is inside PopupWindow. When i shown PopupWindow and click on Listview row in device ASUS K00z fonepad worke very well. But in HTC Z715e is not working (onitem click event not fired) 1.This is my listview item layout
1
2 3
23 24