[Samsung Galaxy Mega] unclefab:
This mod will enable 5 layouts Floating Multi Windows on your Mega I9200/I9205 running JB 4.2.2.

DO NOT POST REPLIES LIKE "IT DOESN'T WORK ON MY MEGA 5.8", OR "IT DOESN'T WORK ON 4.4.2" CUZ YOU WILL BE IGNORED.

IT TOOK ME LONG TIME TO MAKE THIS MOD SO THE LEAST YOU CAN DO IS TO READ THIS OP COMPLETELY.

THE SAME APPLIES IF YOU WANT ME TO TRY TO MAKE THIS MOD COMPATIBLE WITH YOUR PHONE VERSION, READ OP AND SEE WHAT FILES I NEED.

5 LAYOUTS? WHAT'S THAT ABOUT?

Think KK quad view style, you can split the screen in 2, 3 or 4 areas and open up to 4 apps at the same time and on the same screen.

BUT, this mod enables Floating Windows too, whereas KK doesn't (at least until someone finds a way to make windows float on KK, provided that it's doable at all;)).

See what I mean? No?

Then have a look at the screenies below...

RIP

The old thread that was here:

http://xdaforums.com/showthread.php?t=2549794

is now deprecated, but you can give it a look if you are curious about how it all started.:p

That old thread was a bit messy with many flashable and non flashable files scattered here and there, so I decided to put everything in order by making a new thread with only one zip, moreover that the 5 layouts mod is a major update and that it comes with some improvements and bug fixes.

DISCLAIMER

I'm not responsible for anything that may happen, your Mega, your responsability. The mod works fine on mine but one never knows, so make sure you have a Nandroid backup.

REQUIREMENTS

A rooted Mega I9200 or I9205, with a custom recovery (either CWM, or Philz, or whatever) installed.

It works on deodexed Roms only, and it has been tested on DDUCNB1 (the very latest 4.2.2 firmware).

I can't tell for sure whether it works on other Roms or not, but my guess is that it does.

Please try and report (but don't forget to make a backup beforehands:cyclops:), and in case it doesn't work upload your:

android.policy.jar

framework.jar

framework-res.apk

FlashBarService.apk

SecSettings.apk

and I'll mod them for you.

One things is that the current files come from my home made Rom and some have been green themed, so some icons and writings will come out green. In case you don't like it tell me and I'll upload non themed apks.

INSTALLATION

Using your favorite root browser navigate to /system/etc/permissions folder and find com.sec.feature.multiwindow.phone.xml.

Rename it com.sec.feature.multiwindow.phone.xml.bak (do not delete it, in case you want to revert back to static stock multi windows).

In the same folder you'll find com.sec.feature.multiwindow.xml, rename it com.sec.feature.multiwindow.xml.bak (same remark as above).

Now you can flash the mod from recovery. wipe cache and dalvik cache, reboot, that's it.

AND?

Now when you open an app you can see an icon at the top right or at the top bottom, press it, the app switches to Floating Window view.

In floating mode you can see on the top bar a close, a maximize and a pin button, plus a minimize icon.

The close and maximize icons speak by themselves.

The minimize icon shrinks the window to a bar like on a computer.

The pin button, press it, it changes color and enables you to keep the Floating Window (s) allways on screen.

Use the space between the pin and the other icons to drag and move the window wherever it pleases you.

While in floating mode you can press the maximize icon, or double tap the center of the bar, to get the window back to full screen mode.

Open your FlashBar (the bar from where you launch the multi windows) and look at the top, you'll see two icons.

One is for cascade mode, and the other for 2, 3R, 3L and 4 (dual, tri right, tri left and quad) mode.

When you press an icon it turns green, which means that the mode is activated.

If some windows disappeared and you want them back, or if you had too many windows opened in dual, tri or quad mode and want to put all of them in order, press the cascade icon and they'll open in cascade mode (but it only works if the apps are still active, if they had been closed it obviously doesn't work).

While in 2, 3R, 3L and 4 mode, if you drag an app from the Flash Bar it will open in dual mod (taking half of the screen) but if you simply click on it it will open taking a quarter of the screen.

Then it's up to you to open 2, 3 (2 at the top and 1 at the bottom, or the opposite) or 4 windows at once, to move windows from top right to top left or from bottom to top, to cascade etc.

In cascade mode you can resize windows from the bottom, the left and the right.

In 2, 3R, 3L and 4 mode you can resize windows as well, but to do so you have to activate (press) the pin first.

In cascade mode I've set the windows to be quite small because it's the way I like them, but in case you don't then just tell me and I'll change the size.

BUGS

1-The template option in the Flash Bar may work or may not depending on your phone configuration. At first it worked on mine but then it stopped, I have to look into it...

2-The tray bar (the bar between the windows in 2, 3 and 4 mode) is sometimes a bit erratic, but it depends on your phone configuration so you may not experience it at all.

3-Most likely the multi window option has disappeared from the quick toggles, but you still can turn it on and off from the display settings.

If you want the multiwindow quick toggle back, open the settings storage apk (AKA SecSettingsProvider.apk) data base with a sqlite editor, go to settings, find the line called "notification_panel_active_app_list" and add "MultiWindow;" (without the "" symbols).

4-You tell me.

ADD

I've attached a zip, DO NOT FLASH IT!

Unzip it, it contains com.sec.feature.minimode_tray.xml that may help in case you experience issues with the tray bar while in 2, 3R, 3L and 4 mode.

Copy it manually in /system/etc/permissions and set perms to rw, r, r (644), reboot.

OK, THANKS FOR THE BLAH BLAH BUT WHERE IS THE LINK?

It's here mate:p:

http://d-h.st/O88

UPDATES?

Maybe, I have 2-3 things on my mind but I'm not sure I will manage to implement them.

Stay tuned...:good:

CREDITS

[MENTION=2176838]THEDEVIOUS1[/MENTION], without him I would never have known that windows could float on Android.

[MENTION=4948919]xperiacle[/MENTION], the one that found the basics about Floating Windows.