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
0
votes
2 answers

How to show popup in map activity (Fragment Activity) in android

I want to show the popup in mapsactivity but it shows the error. so help me to get from this initiatePopupWindow(getWindow().getDecorView().getRootView()); popup function private void initiatePopupWindow(View view) { try { //We need…
0
votes
1 answer

How to create a popup window programmatically in Android

I have made Activity which will popup on click of button. I have to add listener on Image Button. I have made the design in XMl but I want to design programmatically. This is my image of xml design.
0
votes
1 answer

How to make PopupWindow not dismiss on background touch, and still able to enter text into its TextView

I have an Activity with two PopupWindow, one a popup calculator which works fine, I can only dismiss it via clicking the close button and that is perfect. The second window (we'll call RW) has two EditText to input numbers, which may be got using…
0
votes
0 answers

Android: Avoiding top popup blocks taps on screen

I have a broadcastReceiver which creates a popup on top of all of apps using WindowManager. I got this working but the problem now is when the popup is opened it's impossible to tap on the activities which are on the back of the popup. it's felt…
0
votes
1 answer

PopupMenu - how to?

I am beginner in android and try to make an app that popup a menu when imageView is clicked. Actually it works but popup at right side and I want to be at center. So, I searched for it on web and come across ListPopupWindow, PopupWindow…
0
votes
1 answer

PopUpWindow WindowManager$BadTokenException: Unable to add window - token null is not valid

I started a project with many UIs. This leads to have a tutorial screen. Therefore, I built a popUpwindow for the first use. But I had some troubles with popupWindow. I added the following code to create it: SharedPreferences sharedPreference14 =…
0
votes
1 answer

ListPopupWindow closes soft keyboard

Working on a lockscreen app I see a very strange behaviour: showing a ListPopupWindow forces the soft keyboard to close. This happens only on a "lockscreen" activity (activity window flags are set to FLAG_SHOW_WHEN_LOCKED|FLAG_DISMISS_KEYGUARD) and…
anagaf
  • 2,120
  • 1
  • 18
  • 15
0
votes
1 answer

How to Customize Popup Menu in android

I'm trying to customize popup menu but failed to customize. I had tried many suggestions and solution but no luck to achieve this. Please check and suggest me where I'm wrong... I want to Create Popmenu like this: And I've tried these codes: public…
Garg
  • 2,731
  • 2
  • 36
  • 47
0
votes
1 answer

How to hide navigation bar

I've got a promblem with Android app. I use this code to hide navigation bar. public class Initer { public static void fullScreen(Window window) { if (Build.VERSION.SDK_INT >= 19) { View decor = window.getDecorView(); …
0
votes
1 answer

Keyboard and Focus issue in PopupWindow

I am showing a popup window , if i initialize it as follows : popupWindow.setBackgroundDrawable(new BitmapDrawable()); popupWindow.setFocusable(false); And @Override public void onBackPressed() { if (popupWindow.isShowing()) { …
0
votes
0 answers

Spinner in popup works on emulator but on device

This is a question similar to many others regarding BadTokenException: Unable to add window - is your activity running? In short I have a popup that has two Spinners. When I click on them in the emulator everything works fine. However, when using my…
El_Loco
  • 1,716
  • 4
  • 20
  • 35
0
votes
1 answer

How to detect if activity has been obscured

I want to detect if any otherapp going to draw over my activity, I tried with this Answer but no sucesss, can any body help me get notification when activity got obscured by any other view like face book chat head etc.
0
votes
1 answer

PopupMenu from PopupWindow in Android

UPDATE The following works on API 26 but it crashes on API 23. Does anyone know why this is the case? Also, any workaround? I really need your help with my android development. What I want to do is have PopupWindow. Inside the popupwindow, there is…
codingdaddy
  • 407
  • 5
  • 17
0
votes
1 answer

CountDownTimer stops when PopupWindow appears

In an Android activity I'm using a CountDownTimer as follows: timer = new CountDownTimer(time, 1000) { public void onTick(long millisUntilFinished) { timeView.setText(String.format(Locale.getDefault(), "%ds",…
machinery
  • 5,972
  • 12
  • 67
  • 118
0
votes
0 answers

ListPopupWindow doesn't display list correctly when keyboard hides

I am hiding keyboard on click on the edit text which is an anchor view to list popup window but the list is shown at a wrong place not on the required anchor view. But it works perfectly fine if the keyboard is already hidden i.e. the list is shown…
Harmeet Kaur
  • 154
  • 14