Questions tagged [android-windowmanager]

The Android WindowManager is a system service, which is responsible for managing the z-ordered list of windows, which windows are visible, and how they are laid out on screen.

The Android WindowManager is a system service, which is responsible for managing the z-ordered list of windows, which windows are visible, and how they are laid out on screen.

Check the official WindowManager documentation for more details on the contract interface.

565 questions
0
votes
1 answer

Android: WindowManager BadTokenException

I have reviewed every post about this exception of AlertDialog and spent 2 days to trace issue but could'nt. Can anyone see something i miss here? Popup is displaying from Fragment and having the context of Parent-Activity. IBinder token =…
Waqar Khan
  • 468
  • 4
  • 18
0
votes
1 answer

Custom Views added by WindowManager not resize when Soft Input shows

I have a custom View extending from RelativeLayout. It consists of an ImageView, a PullToRefresh View and an EditText. When my app receives push notification from GCM, I use WindowManager to add the custom View. Everything works fine except the fact…
DucTran
  • 68
  • 10
0
votes
2 answers

WindowManager.removeView() gives IllegalStateException

I'm trying to create a custom chatHead which would show only when a particular app is open. (e.g. Messenger or WhatsApp). And would be destroyed when that app has been closed. Here's my code- @Override public void onCreate() { …
deathstroke
  • 526
  • 12
  • 33
0
votes
2 answers

How to wrap Dialog Window to Content?

I'm developing a Dialog, which should shrink to its content, so, I want to get a behaviour like wrap_content in a common view but for a normal Dialog. That's what I want to show in a Dialog Window In a Dialog Window should look like this but this…
0
votes
1 answer

ChatHead CloseArea

i'm building chathead with closeArea.. CloseArea is bottom of screen, where when you move chathead so chathead disappear. Like facebook messanger have. I have annimation, which show and hide closeArea. Here is code: private ImageView…
Lalson
  • 293
  • 1
  • 3
  • 14
0
votes
0 answers

Android WindowManager graceful crash handling

I'm writing an app for Android that uses the WindowManager class to create popup windows. Everything is working fine, except I am worried about my app crashing. I'm operating under the assumption that, no matter how well my app is coded, someone…
Tom
  • 6,947
  • 7
  • 46
  • 76
0
votes
1 answer

Turning screen on/off - android

I have written code to turn screen on/off based on the brightness. I am able to turn screen off but when screen is turned on the brightness is updated to 1 but screen doesn't wakes up and shows itself. I have to use the manual lock/unlock button on…
Amrit
  • 2,295
  • 4
  • 25
  • 42
0
votes
1 answer

WindowLeaked Error PhoneWindow

I am getting WindowLeakedError while trying to show ProgressDialog in onPreExecute in AsyncTask. Some Stackoverflow threads have mentioned there could be the case that Activity is finishing and I try to show ProgressDialog in same Activity this…
0
votes
1 answer

VideoView in WindowManager not updating

I'm trying to play a video with VideoView in WindowManager. I'm using the StandOutLibrary for this. I've been pretty successful so far except a couple of things. MediaController obviously does not work in this case since it needs an activity. So I…
0
votes
1 answer

WindowManager.addView BadTokenException on Orientation Change

I am trying to overlay the actionbar with a TextView everytime the user pulls down to refresh the list view that is displayed (exactly the way the Gmail app or the reddit sync app do it). I am using a SwipeRefreshLayout for the refreshing, but I…
0
votes
1 answer

Get physical display size in inch, Android?

Is there any way to get physical height and width of screen grammatically. I tried this one DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); double x =…
CoDe
  • 11,056
  • 14
  • 90
  • 197
0
votes
1 answer

Why this alertdialog size work on some devices and not work on some devices?

What I want is : when a user press button I want to alertdialog which I want is top right. I did something and it works as what I want but on some devices it does not work as I want. I mean it its size is wrong and when I click outside the…
CompEng
  • 7,161
  • 16
  • 68
  • 122
0
votes
1 answer

Android: WindowManager views count

In my application I add a RelativeLayout to the window (they're a banner sort). Occasionally there could be more than one "banner", and so I want to count the number of views a.k.a "banners" inside the window, so I can set some MarginTop or sort to…
xXJJJasonMokXx
  • 367
  • 4
  • 17
0
votes
1 answer

Android WindowManager fullscreen

This is my code : windowManager = (WindowManager) getSystemService(WINDOW_SERVICE); LayoutInflater li = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE); menubuttonClosed = li.inflate(R.layout.menu_button, null); menubutton =…
Mehdi
  • 974
  • 1
  • 10
  • 24
0
votes
1 answer

How to wrap content a button on this code? (Window manager) (Android)

How can I make this button, a button created by code wrap its contents? This is a service using window manager to display the view. The Button is called mainButton. The problem is that that button filled the parent. package…
The One
  • 1,085
  • 6
  • 13
  • 25