Open source for multi-form 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-form system, there are a lot of shortcomings, but also more generous to enlighten ah, the code has all open source.



Video Address

Source code Address


Done:

1. The app is displayed as a form

The PackageName filter in PHONEWINDOWMANAGER::LAYOUTWINDOWLW () enables the specified app to be displayed in a non-full-screen size, since an app typically displays multiple activity in a single task, Therefore, we adopt the method of PackageName filtration.


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

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


3. Change window's Touch region

Change Inputmonitor::addinputwindowhandlelw () so that the region of the window intercept touch event is only within the scope of this form.


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, assuming that the control is more difficult to switch across the stack, the recentactivity is moved to the app stack to start, so that the outgoing recentactivity 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 is also a combination of AMS to do some control activity life cycle work.


7. Add a mouth app

Provide the user with the option to let the app start in a form, and register a service defined in ServiceManager that contains the pkgs to form the display, which 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 or the source code very many places are not familiar, so always piecemeal, foot pain medical teaching.


2. Familiar with AMS control process

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

Updated on 20140730-------------------------------------------------------------------------------------------

A brief introduction to the PPT of the Multi window development process:


Open source for multi-form systems developed based on Android 4.4

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.