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
1
vote
1 answer

Keep Android Popup Windows always on top , even though activity goes in background and new activity comes back

This is a popup window which is being shown from an activity A. User presses button on Activity A then Activity B comes on top. But problem is popup also goes behind activity B. I want pop up to be always on top even though activity goes in back…
Tejas
  • 358
  • 5
  • 23
1
vote
0 answers

why am i getting nullpointexception on a virtual method onclick listener

I'm trying to implement a popup window for app, but I guess my implementation is not correct. I'm getting nullpointexception virtual method null object. I guess I'm calling the onclickListener on a null object. what is the correct way to implement…
miatech
  • 2,150
  • 8
  • 41
  • 78
1
vote
1 answer

how to make snackbar appear above popupwindow?

snackbar not working inside popupwindow. Here is the code what i have tried. first i created popupwindow //popupwindow LayoutInflater inflater = (LayoutInflater) AddMembersToEventActivity.this.getSystemService(LAYOUT_INFLATER_SERVICE); …
Mithun Kumar
  • 595
  • 1
  • 9
  • 18
1
vote
1 answer

PopupWindow.showAtLocation(View parent, int gravity, int x, int y) is not showing at specified location with GridView

I'm facing an issue with popupWindow.showAtLocation(View parent, int gravity, int x, int y) here x-axis is working properly but it doesn't move on y-axis. Popup window is still showing on top of activity, but it finely locating at left or right…
1
vote
3 answers

How to get RecyclerView position from PopupMenu onMenuItemClick

Using a RecylcerView, I'm trying to have a popup menu for each item in the list, similar to this: Creating the popup menu is simple, but how do you get the position of the item clicked in onMenuItemClicked? public class Activity extends…
Mahonster
  • 1,381
  • 2
  • 8
  • 14
1
vote
0 answers

Prevent Soft Keyboard and popupWindow from closing when any Gridview/ListView Item is being clicked in PopupWindow

I am working on an android application. In an activity, I am showing a popupWindow on clicking on a button in my activity. This PopupWindow is having an EditText Field. When EditText is in focus the soft keyboard opens. When I type in EditText…
Prithniraj Nicyone
  • 5,021
  • 13
  • 52
  • 78
1
vote
1 answer

How to replace the actionbar by a popup menu?

I want to achieve 1 of these options for my EditText : Replace the actionbar that appear on the top by a popup menu instead. Something like this for exemple: Or make the actionbar floating and child of my current view (in some way same a first…
1
vote
0 answers

Shadow-layer around a PopupWindow, preferably programatically

I'm looking for the easiest way to set a shadow layer around my PopupWindow to increase its visibility. I've looked at solutions involving making a custom-9-patch-graphic but that seems hard to customize dynamically (my PopupWindow is showing…
1
vote
2 answers

Android XML: Image views in a pop window don't fit, force the last one to scale

I have four imageviews in a pop up window. They are identical, in a relative layout, side by side(each one set to be to the right of the one next to them) . When they launch, they don't all fit so the fourth imageview automatically scales down. Is…
1
vote
3 answers

How to set the max height of a listView in android

I put the listView in a popupWindow, when it has many items, the popupWindow exceed the screen size, so I want to limit the max height(or max item, show scroll bar if exceed) of the listView, thanks all
Zijian
  • 207
  • 1
  • 9
1
vote
0 answers

Show PopUpWindow at the top of Soft Keyboard

I'm trying to show my PopUpWindow at the top of my edittext (with softkeyboard present) how can i do that? Consider my EditText has android:maxLines="5" and Y position is not always the same. This is what i got so far... private void…
1
vote
2 answers

Dismiss PopupWindow in Fragment when click outside

I have a Fragment with PopupWindow. I initiate Popup with following code: private PopupWindow createPopup; private void initiateWindow(){ try { LayoutInflater inflater = (LayoutInflater) getActivity() …
Oleksandr Firsov
  • 1,428
  • 1
  • 21
  • 48
1
vote
3 answers

Setting onClickListner for items within popup window in android

I have a popup window that contains 2 text views. If user click on one text view toast must appear.I coded for this function but shows Nullpointer exception in line far.setOnClickListener(new OnClickListener() { Please help me on this. My code…
tenten
  • 1,276
  • 2
  • 26
  • 54
1
vote
2 answers

best way to implement pop up window in android application

I have the main activity in which I have few menu buttons. When the user presses specific button I want to open a new activity which also have a couple of buttons which I need to handle their click. In other words, I need to pop up window…
A.T
  • 71
  • 2
  • 9
1
vote
1 answer

Android PopupWindow and SeekBar listener not responding

Does anyone know why my seekbar listener is not picking up any data from the seekbar?? i have it all setup and working but it isnt updating the textviews, i think it has something to do with the popup window using a different activity layout to the…