Questions tagged [android-window]

49 questions
88
votes
4 answers

What is an Android window?

What is a Window in Android? I thought the top-most level in Android is called Activity, which is the screen you see. Can someone tell me what a Window in Android is? do we just have one or multiple of them.
user1233587
  • 2,033
  • 4
  • 24
  • 24
23
votes
6 answers

Is there a way to programmatically locate all Windows within a given application?

Is it possible to programmatically enumerate all of the android.view.Windows, or decor views within an application? Dialogs for example will both open in a new Window, separate from the main Activity window. I can locate them via Dialog.getWindow()…
Andrew Lavers
  • 8,023
  • 1
  • 33
  • 50
16
votes
7 answers

How to show keyboard with Jetpack Compose?

How can I slide in the keyboard? I tried: val keyboardController: SoftwareKeyboardController? = LocalSoftwareKeyboardController.current keyboardController?.show() But it does not work. What am I missing? Maybe some Manifest flags?
13
votes
2 answers

Display DialogFragment content below status bar

Im trying to display an DialogFragment with match_parent both for height and width but it happens that on top the DialogFragment is being displayed below StatusBar. The DialogFragment is applying some default value for padding on bottom, right,…
10
votes
2 answers

Make clear about addFlags and setFlags in android.view.Window class

I know what setFlags does is replacing the old flags with the new ones. And addFlags is appending more flag. I'm just confused why are the arguments in setFlags method that I've seen usually the same? For…
Hai Hack
  • 948
  • 13
  • 24
9
votes
2 answers

How to create a floating window like Clipboard Pro App?

The following image is a window of the app https://play.google.com/store/apps/details?id=jp.snowlife01.android.clipboard. i named it as main window. It's seem that main window is not a normal window. it's on the top of other windows, the main window…
HelloCW
  • 843
  • 22
  • 125
  • 310
9
votes
3 answers

How to get the window instance from a view?

i add a view in the windowManager via mWindowManager.addview(). Now i would like to know if it's possible to get the window instance. their is myView.getWindowID() and myView.getWindowToken() but i can't find a way to retrieve from it the window…
zeus
  • 12,173
  • 9
  • 63
  • 184
7
votes
1 answer

Dark-text transparent status bar with opaque navigation bar

Wait, it is not a duplicate A similar question has been asked here, but not addressing dark-text status bar. What I want to do I want to achieve 3 things at the same time: Transparent status bar (Not hiding it!) Dark-text status bar Opaque (or…
6
votes
0 answers

Can't receive Motion Events with Window.Callback

My task is receiving all motion events in android application with good embedding (library variant). I create my Window.Callback wrapper. public class WindowCallback implements Window.Callback { private final Window.Callback wrapper; public…
6
votes
1 answer

Change status bar color without having Window

I want to manipulate the status bar (ex.color) but in the background. I am using a foreground service to do this. Thus there is no window as it is happening in the background, specifically there is no activity. However, the function public abstract…
6
votes
1 answer

Remove FLAG_TRANSLUCENT_STATUS at runtime

I have a MainActivity with lots of Fragments and in one specific Fragment I want to draw behind system bar, so I'm applying at runtime the following flag : if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { …
Mes
  • 1,671
  • 3
  • 20
  • 36
5
votes
4 answers

Long press EditText crash: Unable to add window

I am trying to do a long click in an EditText, but when I do a long Click, I receive the error below. I would like to be able to do a long click to get the Copy/Paste/Select All context popup so that the user can paste text into the box. Fatal…
5
votes
2 answers

Disable multi window feature programmatically

I am trying to disable multi window feature of android. I have read the android documentation and know that resizeableActivity would only work for android N (API level 24) but I want to disable it on lower level android APIs. As Samsung devices…
4
votes
1 answer

ViewCompat.setOnApplyWindowInsetsListener makes Status Bar color disappear

This is the code I use to detect when the Keyboard Height changes. Only the problem is that the Statur Bar color disappears and turns white when this code runs. ViewCompat.setOnApplyWindowInsetsListener(this.getWindow().getDecorView(), (v, insets)…
Peter
  • 1,848
  • 4
  • 26
  • 44
4
votes
1 answer

Android - Full Screen without moving the content

I am developing a reading app from where users can read multiple types of documents. This app also has a feature to enable full screen by touching any part of the screen. I am able to enable/disable full screen by hiding the status bar and the tool…
1
2 3 4