How To
How to enable Nougat’s Freeform Window Mode on any Android Nougat device

Android Nougat 7.0 Update featured one of the most anticipated features of all time, the multi-window mode. This feature was already available in most of the other third party custom skins like Samsung and LG, etc. However, when you talk about stock Android users, this was the first taste of this experience. While it is always good to have this feature, there is something else that Android Nougat update brought to the table. Yes, there is a third multi-window mode present in Android which most people are not aware of, and it is called the Freeform multi-window mode.
The Freeform multi-window mode allows Android to present the apps as a floating window. This means, if you an app running and you quickly want another supporting app like calculator, etc. then this feature can be used and apps can be made to float on existing apps. And since it is a floating window, users will also have the ability to move and resize them as per their wish.
In the SDK documentation, it is stated that ‘any user with a device of a large form factor can enable this mode called Freeform window which will enable the ability to resize and make them float.’ It is also stated that this mode will be available in addition to the split-screen mode. However, this doesn’t mean that you need to have a device with a large form factor to enable this feature. Any device running Android 7.0 nougat and developer options enabled can use this feature. And if you wish you enable this feature on your device, then we suggest you follow the procedure given below –
There are two methods to achieve this, and both of them are listed below. Depending upon the pre-requisites, you can use either of them to make sure that your device gets the freeform feature.
Method 1
This method requires a computer with adb, i.e., Android Debug Bridge and hence if you don’t have one then, we suggest you follow the second method.
- Before starting anything, first make sure that USB Debugging is enabled. You can check for this by going to the developer settings on your device.
- Once it is out of the way, the next step is to connect your device to a computer with adb installed.
- Then execute the following command –
adb shell settings put global enable_freeform_support 1
Method 2
This method requires no extra requirements and simply your device can be used to enable the feature.
- All you have to do is go to developer options and enable the “Force activities to be resizable” option that can be found at the bottom.
Do make a note that both the methods require your device to be rebooted so that the feature gets enabled.
Now once if you have enabled the Freeform mode using the first method, then you will see a new button on app entries. This can b used to launch an app into freeform window mode. However, if you used the method 2 to achieve this mode, then it is not possible to launch an app into the freeform mode by Android itself. In this case, the key to launching an app in the freeform mode is to call the ActivityOptions.setLaunchBounds() method. You have to use startActivity(Intent, Bundle) to start the app. If you don’t have an ActivityOptions bundle, you can create one with ActivityOptions.makeBasic().
Before starting to use this feature, you need to make sure that there are no apps in the recent app menu. If it is there, then the app you called for will simply go back to the full-screen menu mode and this feature won’t work properly. Hence you need to make sure that you clear any and all tasks from the overview menu.
Few things to keep in mind –
- Apps in freeform mode run in a stack which is separate from the rest of the system. Hence it is not possible for freeform apps to run on top of the launcher or on top of another full-screen app.
- Also, any application that is designed to behave well in Android’s standard split-screen window mode, will work flawlessly on freeform mode as well.
The below mentioned publicly-available classes and methods that any app can use to relate specifically to freeform mode –
- Window.setDecorCaptionShade(): the shade of the caption controls can be overridden using this method.
- Window.setRestrictedCaptionAreaListener(): this method detects the movement of the windows around in the freeform mode.
- ActivityInfo.WindowLayout: you can this method and set layout parameters so that once the app is launched in freeform, it will launch with these specified boundaries.
You can also download some third-party apps and use it in freeform mode. This will allow you to get a PC-like experience, however, it is suggested that you try it with a device of larger form factor to get the full experience. You can check the source link below to know more about the app and how you can use it to get a PC-like experience.