Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android N multi-window support #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pp3345
Copy link

@pp3345 pp3345 commented Nov 5, 2016

This PR adds full multi-window support for Android 7.0+.

As soon as the framework enters multi-window mode a new button "New window" (keyboard shortcut Ctrl+Alt+W) becomes visible in the drawer menu. Clicking the button will create a new window. Terminal sessions are shared between windows, however, only one terminal window may attach to a specific session at a time. When creating a new window, the first unattached session will be attached to the new window. If no unattached sessions are available, a new session will be created.

Some screenshots of Termux running in multi-window mode on Android 7.1.1:
screenshot_1478367704
(split-screen)

screenshot_1478368051
(freeform mode)

In the second screenshot, for example, the left window may not be attached to sessions 2 and 3, since they are already attached to the other windows. Any window can switch to session 4.

@pp3345
Copy link
Author

pp3345 commented Nov 16, 2016

ping @fornwall Could you have a look at this PR? Thanks!

@fornwall
Copy link
Member

@pp3345 Thanks, looks interesting!

What's currently the best way to test freeform mode on a device or emulator?

@pp3345
Copy link
Author

pp3345 commented Nov 16, 2016

Freeform mode is still unofficial and experimental in Android. It may be enabled on any device or emulator running Android 7.0 or 7.1 by executing adb shell settings put global enable_freeform_support 1. After rebooting the device (or emulator), apps may be switched to freeform mode by opening Recent Apps and long-clicking on an app window until a square icon appears in the upper right (rarely it won't appear, then just close Recent Apps and try again). Clicking the icon will move the app to freeform. Freeform still has some quirks and bugs, but most of the time it works okay. Split-screen always works and does not require unlocking freeform mode.

Freeform feels better when using a real mouse instead of touch input, especially when resizing windows (you need to hit some unhighlighted area around the window for resizing with touch input), but for testing, touch should be okay.

@pp3345
Copy link
Author

pp3345 commented Dec 4, 2016

ping @fornwall Any news?

@fornwall
Copy link
Member

@pp3345 Sorry for the delay here! Will look into it soon and get back to you (I just have some other issues and features in the pipeline I want to get done first).

@pylerSM
Copy link

pylerSM commented Mar 27, 2017

News?

@TheDiamondYT1
Copy link

?

@pp3345
Copy link
Author

pp3345 commented Jun 26, 2017

Nothing has happened here for a while since I didn't receive any feedback from the Termux developer. By now, the PR has some conflicts with the base branch. I'll be happy to resolve those conflicts and update the PR but first I'd like to get some feedback from @fornwall or else this doesn't seem to make a lot of sense to me.

@luisdavim
Copy link

Any updates here?

@luisdavim
Copy link

what's holding this up? I would really like to see this feature added.

@termux termux deleted a comment from AJ791 Jul 29, 2017
@fornwall
Copy link
Member

I've put the app functionality itself on the back burner for a while focusing on packages, but I'm planning to give the app itself some love going forward!

@pp3345 About freeform mode, has anything happened with that in the upcoming Android 8? Is it getting more official and/or has anything changed?

@pp3345
Copy link
Author

pp3345 commented Aug 1, 2017

@fornwall I am not sure about that, I haven't tried out Android O so far. There is nothing about changes to multi-window support in https://developer.android.com/preview/api-overview.html. I'll install the current DP on my Pixel C and see if anything has changed.

@pp3345
Copy link
Author

pp3345 commented Aug 2, 2017

Freeform seems to be just the same as in Android 7. The same bugs are still there and it still needs to be enabled manually via adb. This PR still seems to work fine though after some quick tests:

screenshot_20170802-225542

@luisdavim
Copy link

I think this should be merged.

@T-vK
Copy link

T-vK commented Aug 23, 2017

@fornwall So, is this going to happen any time soon?

@bvgastel
Copy link

Ping. This would help me a lot. Please merge.

@davemackintosh
Copy link

This would be great, starting to use my Samsung Dex a lot for development. Sometimes I like to create multiple windows to watch multiple build processes. Any chance of getting these conflicts resolved and this PR merged in for a release please?

@fbartels
Copy link

Isn't this pr obsoleted by #339? At least the split screen feature works for me on a Lenovo tablet. Or are you talking about the free form windows?

@davemackintosh
Copy link

Oh oops. Yes, sorry. I filtered on open PRs when I should have filtered on both open and closed. Nice! Now I'm going to look into better mouse support for selecting text and clicking links. Thanks

@finagolfin
Copy link
Member

Ping @pp3345, still need this and want to get it in?

@pp3345
Copy link
Author

pp3345 commented Aug 5, 2020

@buttaface Never received any feedback from @fornwall and time has passed, so there is a pile of conflicts now. I am not really motivated to put effort into fixing them given that this PR got ignored for so much time already.

@finagolfin
Copy link
Member

@fornwall or @xeffyr, if you'd like to get this feature in, I will work with @pp345 to get it merged. Just let us know.

@ghost
Copy link

ghost commented Aug 6, 2020

@buttaface I'm ok with it, if it doesn't conflict with or break existing functionality.

@finagolfin
Copy link
Member

@pp3345, it looks like this pull has slipped through the cracks. @xeffyr and I are both more recent committers for Termux and if you update your pull, I will review it and help you get this in.

@pp3345
Copy link
Author

pp3345 commented Aug 12, 2020

@buttaface: Okay, I'll try to update the PR. I am afraid I won't have time for that soon though, please give me a month or two.

@finagolfin
Copy link
Member

No hurry, take your time.

@nift4
Copy link

nift4 commented Dec 4, 2021

Hey any updates? This feature would be an great addition

@luisdavim
Copy link

Any chances of this still making it to a release in the future?

@agnostic-apollo
Copy link
Member

Any chances of this still making it to a release in the future?

There is always a chance (in multiverse of madness)! ;)

The idea is actually pretty interesting. However, termux-app has been refactored greatly in the last year or so, so branch would need updating. I would need to take a closer look at the code too. Also will need to take into consideration that termux-float needs to be merged into termux-app in future, which may have similar reqs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.