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

362 questions
3
votes
2 answers

Android M ClassCastException: FrameLayout$LayoutParams cannot be cast to WindowManager$LayoutParams

This piece of code works seems to work in android api 16 - 22 but does not work in api 23. I'm simply trying to display a popupwindow with options in it and dim the background below the popupwindow: WindowPopUp windowPopUp = …
Simon
  • 19,658
  • 27
  • 149
  • 217
3
votes
1 answer

Create popup window for each gridview item - Android

I'm developing an Android application for a restaurant for an food ordering system. In my project,I have a Gridview ,When click on a button on the item in gridview, I want to get a popup window with some textfields,buttons etc. I got help from this…
Kasun Gamage
  • 346
  • 2
  • 3
  • 18
3
votes
0 answers

PopupWindow changes position as keyboard appears

Please see this question. I experienced the same issue, and the answers to the linked question have resolved it. Unfortunately, a side-effect is that as the PopupWindow resizes itself to make space for the keyboard, it also moves it's position…
Ryan Dias
  • 270
  • 2
  • 11
3
votes
1 answer

Popup Window Animation not working

I'm trying to animate a Popup Window when is shown from the bottom of the view with a push_up in animation an when is close with a push_up out animation. But is not working, the popup shows normally with deafult animation (very fast). Here is my…
ZetaPR
  • 964
  • 7
  • 32
3
votes
2 answers

How to show icons along with text in PopupMenu in android?

i have seen some tutorials but couldn't got through. I want to show icons along with item text. Here is my menu item.
Aleena
  • 273
  • 4
  • 12
3
votes
2 answers

How come PopupWindow.OnDismissListener is not called when using Robolectric?

I have a problem. I want to write a test for code that relies on execution of the PopupWindow.OnDismissListener.onDismiss() method. However, it never seems to be called. Am I doing something wrong? Sample code: View content = new…
3
votes
5 answers

onBackPressed not called when PopupWindow is showing

Hee guys, So currently I'm using a PopupWindow to display an in app browser. However when pressing the back button it does nothing. I'm using the PopupWindow in another Fragment, then I use a statement to set the PopupWindow in my FragmentActivity…
Jordi Sipkens
  • 595
  • 1
  • 9
  • 25
3
votes
2 answers

Can two views both have focus in Android

I have a EditText, and a popupWindown(which has a ListView in it), now i touch the EditText, the popupWindow shows. i need the situation: i can input something in SoftInput, and i also can click a child item in ListView which is the children of…
songzhw
  • 272
  • 3
  • 11
3
votes
1 answer

Android PopupWindow Animation not working

I am showing PopupWindow on button click from top-left corner of the screen. But the problem is, when I am opening it, it will shown very fast, that means no animation occurs, but when I am closing it, its working fine, that means it is disappearing…
Pratik Dasa
  • 7,439
  • 4
  • 30
  • 44
2
votes
0 answers

How to detect AutoCompleteTextView popup direction

I'm trying to set a custom drawable to my AutoCompleteTextView's popup background. This is my drawable:
Saman Sattari
  • 3,322
  • 6
  • 30
  • 46
2
votes
0 answers

MIUI 11 preventing Activities (of other apps) being launched from foreground service?

In some recent MIUI 11 update, it seems no longer possible to launch an Activity (at least, of another app) from a System Alert Window (SAW) running in a Foreground Service. I can confirm on my MIUI 11.0.5 device (not sure about earlier versions of…
Mark
  • 7,446
  • 5
  • 55
  • 75
2
votes
2 answers

Dim or blur background of popup window

I am able to get the pop up window but the background is transparent also I am able to read the contents of the activity behind it. I want to dim the background so the pop up and the older activity gets differentiated.
2
votes
2 answers

PopupWindow not inflating on API 19

My PopupWindow is working perfectly fine on my API 28,29 Emulators, but not sure why it's not showing any view on my API 19 real device. The window is definitely created though because when I click on the button that inflates the view, it is…
DIRTY DAVE
  • 2,523
  • 2
  • 20
  • 83
2
votes
1 answer

How to make a popup on a button click inside a fragment page of ViewPager ? Using Kotlin

My app has an activity with ViewPager of three Fragment as pages and each pages has some buttons. So my question is, Is it possible to popup a message or a dialog when click on these buttons, which are inside the fragments pages. Thank You .
P. Mohanta
  • 130
  • 2
  • 15
2
votes
1 answer

Popup window makes notification bar visible on fullscreen activity in android

I have a fullscreen activity and setting it to full screen by the following code private void setFullScreenFocus() { getWindow().getDecorView() .setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE …
WISHY
  • 11,067
  • 25
  • 105
  • 197