Open source for Multi-window systems developed based on Android 4.4

Source: Internet
Author: User

Hi, this is my Android 4.4 based on the development of the Multi-window system, there are a lot of shortcomings, please also advise Ah, the code is all open source.



Video Address

Source Address


Done:

1. The app is displayed in windowed format

Filter by PackageName in PHONEWINDOWMANAGER::LAYOUTWINDOWLW () to make the specified app appear in a non-full-screen size, because an app typically displays multiple activity in a task unit, Therefore, the method of PackageName filtration is adopted.


2. Multiple apps are in Onresume state at the same time

Modify the place in AMS Notification OnPause (), specify that Pkg does not notify pause. The area of activity life cycle control in AMS is to be optimized later.


3. Modify the touch Region of the window

Modify INPUTMONITOR::ADDINPUTWINDOWHANDLELW () so that window intercepts the region of touch event only within the scope of this window.


4. Touch window moves up to the top level of the screen

Add interface to ams,windowsession, intercept touch event in Viewrootimpl, notify WMS, and AMS via windowsession, Move window and task to the top level.


5. Recentactivity boot into the APP stack

Because the visibility switch in the same stack is also better controlled, but if the control is more difficult to switch across the stack, the recentactivity is moved to the app stack to start, so the outgoing recentactivity is When you switch apps, there are no bugs appearing on the display.


6. Add TitleBar to Window

Add TitleBar in Phonewindow::generatelayout (), including close, minimum, maximum, drag area, resize.

Minimum has not yet been implemented, as it also has to do some work to control the activity life cycle with AMS.


7. Add a portal App

The user chooses which app to start in windowed form and registers a custom service in ServiceManager, which stores the pkgs to be windowed and is then called by the framework.


Next Plan:

1. Fix various bugs

The number of bugs just can't bear to look straight ... The key is not familiar with many areas of the source code, so always a piecemeal, foot pain medical teaching.


2. Familiar with AMS control process

Design a reasonable multi-window activity life cycle, complete minimum.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.