Per This link you can fairly easily get the size of your application window. What I was wondering is, is it possible to manually set the size of an application window? Think something like Samsung's floating window, sort of. Clearly it can be done as Samsung is capable of doing it and there are ROMS that can do it as well, but I presume those are features that are baked into the framework. Is there a way to do this without root (or even with root if I can still do it via java and not having to manipulate the actual OS).
Asked
Active
Viewed 192 times
1 Answers
1
You can try one of these answers
1- set absolute numbers in Window.setLayout() to change the activity size . and use relative layout to overlay the activity >> for more explanation refer to the second answer for this Question
2- refer to this Question to create floating activity

Mohammad
- 739
- 7
- 22
-
I presume this is the Window Manager received via Context.getSystemService? – miversen33 Jan 28 '18 at 05:24
-
To add to this, yes this does work. However it does not give the desired effect. The window when resized, will simply show a black background. Is it possible to have it show the actual homescreen behind it? Not the wallpaper, but the legitimate homescreen? – miversen33 Jan 28 '18 at 08:12
-
1I've edited the answer .. the second choice is far better for what you want . – Mohammad Jan 28 '18 at 15:46
-
I was thinking too narrow minded. I am aware of how to make a floating activity, but still I think this is the correct answer for what I am trying to accomplish. Thanks! – miversen33 Jan 28 '18 at 20:40