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
13
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
  • 423
  • 2
  • 6
  • 23
11
votes
2 answers

How do I replace my popupmenu code with ListPopupWindow?

Currently , I am programatically creating a popupmenu which displays a list of floors and a title. However, changing the background color of just the title and adding a close button to title is turning out to be a nightmare. I want to replace this…
user2386226
11
votes
2 answers

Styling Android PopupMenu Divider Lines

I'm using a couple of PopupMenus in my app and they all working as expected But I would like to have white lines separating the individual items, but I can't find where I'm meant to be setting this. I was hoping I could get to the underlying…
11
votes
3 answers

Dim the background using PopupWindow in Android

Can I dim the background using a PopupWindow instead of a Dialog? I am asking this because I am using Dialogs but the Dialog doesn't show below the item clicked and with the PopupWindow I already have the popup showing below the item.
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
10
votes
2 answers

Adding ComposeView to PopupWindow's contentView crashes

I'm trying to show a PopupWindow from a Fragment, and then add a ComposableView to the Popup contentView, and it crashes because the ViewTreeLifecycleOwner is not found for PopupDecorView$PopupDecorView. Things I've tried: Use the PopupWindowCompat…
9
votes
3 answers

Android PopupWindow: White background but keep shadow?

How do I style my PopupWindow in Android with a white background but still keep the shadow? I am trying to create something like [this][1]: By default, my PopupWindow has a dark background. So I set the popup window's contents to have a white…
s89aduasda
  • 231
  • 3
  • 7
7
votes
1 answer

PopupWindow background sometimes gets transparent and purple

Here's how I create a PopupWindow: private static PopupWindow createPopup(FragmentActivity activity, View view) { PopupWindow popup = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, true); …
prom85
  • 16,896
  • 17
  • 122
  • 242
7
votes
6 answers

Android - Popup window not showing in fragment

I'm creating a popupWindow but it is not showing on my Fragment when I call it. Here is my code for the popupWindow: LayoutInflater layoutInflater = (LayoutInflater)getActivity() …
Mary
  • 101
  • 1
  • 1
  • 6
6
votes
1 answer

PopupWindow Enter Exit Animation not working on Marshmallow (23)

I have set Enter/Exit animation style for PopupWindow like this mPopupWindow.setAnimationStyle(R.style.PopupAnimation); and style as