30 July 2020, bySoftware green alliance, HuaweiThe sixth theme Technology Salon jointly held was successfully concluded in the cloud in the form of online live broadcast. The sharing guests of this salon are fromHuawei, Jingdong, WeiboSenior technical experts of,Zero based high efficiency adaptive folding screen as the themeChatting online has attracted more than 1000 developers to watch online. The salon’s speech focused on the industry’s cutting-edge folding screen technology and popular application practice cases, focusing on the three aspects of folding screen mobile phone parallel vision, multi window and drag and drop adaptation, so as to provide strong support for more developers to adapt folding screen efficiently.
For the novice developer, Xiaobai, how to develop and deploy folding screen most easily and efficiently? In this paper, the core content of this online salon activity is sorted out, and interested partners can learn through video. Let’s review the highlights of this issue.
Folding screen mobile phone parallel vision sharing
Firstly, Zheng Yanhua, a senior engineer from Huawei’s CBG software department, focused on the introduction of parallel view, typical scenarios, case sharing, basic adaptation, key parameters introduction, etc., and interpreted the access method, development guidance and adaptation suggestions for the parallel view configuration of folding screen mobile phones for developers.
The system side solution of split screen in application is realized with activity as the basic unit and the technology of left and right windows separated display, dual window life cycle management, dual window display mode and switching logic as the core technologies. The application can design the activity combination by screen according to its own business, so as to achieve the best single application multi window user experience in line with the application logic, and support one-time development and multi terminal deployment.
Traditional browsing mode vs parallel view browsing mode
Split screen diagram
Jingdong app folding screen mobile phone parallel view function adaptation
New technology can bring a variety of experience, but also need a lot of products to better adapt to meet the needs of work and entertainment, life and shopping. Jingdong app is a professional comprehensive online shopping mall. In this topic, Geng Lei, Jingdong advanced Android R & D, demonstrated the actual case of Jingdong app folding screen mobile phone for developers from four aspects: adaptation effect, adaptation process, adaptation scheme and planning.
In the process of adaptation, the preliminary adaptation scheme is determined and the modification cost is estimated. Then, it answers the questions raised by the business side and determines the final adaptation scheme.
Multi window adaptation Guide
Zhu Dengkui, senior engineer of Huawei’s CBG software department, focused on the introduction of Huawei’s smart split screen function and the key points of Huawei’s smart split application. The key points of Huawei’s smart split screen application adaptation are as follows:
1. How to declare support for multiple windows
2. Proper use of application resources
3. Correctly handle configuration changes
4. How to deal with immersion mode in multi window
5. Use of Huawei SDK interface
The lecturer shared the above five points for developers in detail.
With the increasing screen size of mobile terminal devices, multi window mode is bound to become an important form of application display. Huawei’s sidebar dock will also become an important mobile application entrance. It is hoped that more and more applications can adapt to multi windows and enrich the multi window environment of mobile phones.
Folding screen continuity and drag adaptation
The software green alliance evaluates and analyzes the adaptation of domestic top1000 mainstream applications. The evaluation data show that the adaptation rate of folding screen is90%, excellent overall performance. Among the 18 categories of 1000 mainstream applications, the adaptation completion rate of games and children’s applications is less than 90%. It is necessary to focus on the folding screen development guidance series and make improvement.
Yan Hongfei, a folding screen project manager from Huawei, mainly shared Matex specification and interface introduction, basic adaptation, typical cases, development and debugging, drag and drop, etc., to help developers adapt folding screens efficiently. What are the basic requirements for the folding screen?
- All pages of the application can be displayed in full screen in the folded state and expanded screen mode, and the UI display is normal;
- All pages of the application can be switched between the folding state and the expanded screen state to ensure that the user’s business is not interrupted and the UI display is normal;
- When the screen is folded and expanded, the business continuity and UI adjustment are ensured.
Method 1: the page is not restarted and the layout is dynamically adjusted
Method 2: restart the page and save the page and user data before restart
- Do not restart: there are not many display contents that need to be adjusted. It is recommended to select. In the onconfigurationchanged method, the UI is dynamically adjusted by the code to adapt; the view is reinitialized and the view is bound to the data again.
- Restart: the UI is complex and needs to be adjusted dynamically. It is recommended to write a set of layout resources for the large screen under the (layout-sw600dp) directory. Before destroying the activity, save the state through onsaveinstancesstate() and restore the state in oncreate() or onrestoreinstancestate().
Experience sharing of micro blog folding screen mobile phone drag and drop
How does the foldable screen mobile phone realize the drag and drop of text, picture and video in the scene of microblog publisher? In this topic, Li Wei, a senior Android Engineer from Sina Weibo, divided the content of the topic into three parts, namely:
- Drag effect display
- Implementation scheme analysis
- Second phase planning of microblog dragging
In the implementation scheme analysis, the API involved in the implementation of split screen drag and drop includes:
Technology is constantly innovating. As a developer, we need to explore new development and design solutions with innovation. I believe there are more possibilities for innovative experience of folding screen. Different products and functions will have new requirements. We are looking forward to better solutions.