On July 30, 2020, the sixth theme Technology Salon jointly held by Software Green Alliance and Huawei was successfully concluded by online live broadcast on cloud. The sharing guests of this salon are senior technical experts from Huawei, JINGdong and Weibo. They chatted online with the theme of efficient adaptation of folding screen on zero basis, which attracted more than one thousand developers to watch online. Salon’s speech focused on cutting-edge fold-screen technology and popular application practice cases in the industry, focusing on three aspects of fold-screen mobile phone parallel view, multi-window, drag and drop adaptation, providing strong support for more developers to efficiently adapt fold-screen.

For the entry-level developers, white, how to the most easy, the most efficient folding screen development and deployment? This article sorted out the core content of the online salon, and interested partners can learn through video. Let’s review the highlights of this salon.

Parallel view sharing of foldable phones

First of all, Zheng Yanhua, a senior engineer from CBG software Department of Huawei, focused on the introduction of parallel horizon, typical scenarios, case sharing, basic adaptation, introduction of key parameters and other aspects, and explained the access method, development guidance and adaptation suggestions of parallel horizon configuration for fold-screen mobile phone for developers.

Parallel view is a system side solution to realize in-application split screen with Activity as the basic unit and left and right window separation display technology, dual window life cycle management, dual window display mode and switching logic as the core technology. The application can design the combination of split-screen display activities according to its own business, so as to achieve the best single application and multi-window user experience in accordance with the application logic, and support one-time development and multi-terminal deployment.

Traditional browsing vs. parallel viewing

A typical scenario

Split screen diagram

Jingdong App folding screen mobile phone parallel view function adaptation

New technology can bring diversified experience, but also need many products can better adapt to meet the needs of work, entertainment, life and shopping. Jingdong App as a professional comprehensive online shopping mall, in this issue, Jingdong Senior Android research and development Geng Lei from the adaptation effect, adaptation process, adaptation scheme, planning four aspects for developers to demonstrate the actual case of JINGdong App folding screen mobile phone.

In the process of adaptation, the preliminary adaptation scheme and modification cost should be determined. Then synchronize the adaptation scheme with the business side, answer the questions raised by the business side, and determine the final adaptation scheme.

Multi-window adaptation guide

Zhu Dengkui, senior engineer of HUAWEI CBG software Department, focused on the introduction of Huawei smart split-screen functions and key points of huawei smart split-screen application adaptation. Key points of huawei smart split-screen application:

1. How to declare support for multiple Windows

2. Use application resources correctly

3. Correctly handle Configuration changes

4. Correctly handle the immersion under multiple Windows

5. Use of Huawei SDK interface

The instructor shared the above five points in detail for developers.

With the increasing screen size of mobile terminal devices, multi-window mode is bound to become an important form of application display, and Huawei’s sidebar Dock will also become an important entry point for mobile applications. It is hoped that more and more applications can adapt to multi-window and enrich the multi-window ecology of mobile phones.

Folding screen continuity and drag adaptation are introduced

The Software Green Alliance conducted an adaptation evaluation and analysis of TOP1000 mainstream applications in China, and the evaluation data showed that the adaptation rate of foldable screen was 90%, with excellent overall performance. Among the 18 categories of thousands of mainstream applications, the adaptation completion rate of game and children apps is less than 90%, so it is necessary to focus on the foldable screen development guidance series and improve them.

Yan Hongfei, foldable screen project manager from Huawei, mainly shared MateX specifications and interface introduction, basic adaptation, typical cases, development and debugging, drag and drop and other contents to help developers efficiently adapt foldable screen. What are the basic requirements for this innovative folding screen?

  • All pages of the application can be displayed in full screen in folded or expanded large screen mode, and the UI display is normal.
  • All pages of the application can be switched between the folded state and the large screen state to ensure that user services are not interrupted and the UI display is normal.
  • Ensure business continuity and UI adjustment when the screen is folded and expanded.

Method 1: Dynamically adjust the layout without restarting the page

Mode 2: Saves the page and user data before restarting the page

  • Do not restart: You are advised to change the displayed information. Dynamically adjust the UI in the onConfigurationChanged method by code; Reinitialize the View and rebind the View to the data.
  • Restart: The UI is complex and dynamic adjustment is required. You are advised to write a set of layout resources for the large screen and put them in the (layout-SW600DP) directory. Before destroying the activity, store the state in onSaveInstancesState() and restore the state in onCreate() or onRestoreInstanceState().

Sharing experience of mobile phone drag adaptation with folding screen

How does the foldable mobile phone achieve text, picture and video drag and drop in the scene of microblog publisher? In this topic, Li Wei, senior Android engineer from Sina Weibo, divided the topic into three parts to introduce, which are as follows:

  • Drag and drop effect display
  • Implementation solution analysis
  • Micro-blog drag phase ii planning

In the analysis of the implementation scheme, the API involved in the split-screen drag implementation includes:

As technology continues to innovate, developers need to explore new development and design solutions along with innovation. I believe there are more possibilities for innovative experience of folding screens. Different products and functions will have new requirements, we look forward to better solutions.