当前位置:网站首页>Ali's ten-year technical experts jointly created the "latest" jetpack compose project combat drill (with demo)
Ali's ten-year technical experts jointly created the "latest" jetpack compose project combat drill (with demo)
2022-04-23 04:28:00 【Programmer - Wu Yanzu】
Preface
Android Jetpack The collection of components can help us write a lot of repetitive code , And can simplify complex tasks , Let's have BUG Reduce , So that we can focus more on business logic , Focus on building the application itself .
The specific benefits of using this architecture are as follows :
- UI Decoupled from business logic .
- Effectively avoid life cycle component memory leakage .
- Improve module testability .
- Improve application stability , Effectively reduce the occurrence probability of the following abnormalities .
- Can not perform this action after onSaveInstanceState
- WindowManager$BadTokenException, is your activity running?
- OOM 、 NullPointerException
- ……
These benefits make it easier for us developers to develop excellent Android application , Finally push Android Rapid development of .
Especially in UI In terms of development , It 's been a long time , Officially released last year Compose It also brings great convenience to developers . As declarative UI The representative of the , Compose Indeed, it has many unique advantages :
- declarative UI, There is no need to refresh the data manually
- Get rid of XML , Completely removed the mixed writing (xml+Java、kotlin) The limitations of
- Super compatibility , Most common libraries ( Such as Navigation、ViewModel and Kotlin coroutines ) All apply to Compose,Compose Be able to work with existing View Systems coexist , You can introduce for an existing project Compose
- Accelerate development , It provides us with a lot of out of the box Material Components , If APP It is used. material Design words , So use Jetpack Compose It can save you a lot of energy .
- Reduce the number of codes , Reduce bug Appearance
- Fully functional , Can completely cover Android All existing system capabilities
- Real-time Preview ,Compose The preview mechanism can be the same as the real machine , True what you see is what you get
Compose Realized Google Its original intention , Major factories are also right Compose be profuse in praise :
To help you better understand Compose, Get started and practice as soon as possible , Here I'd like to introduce to you a powerful share of Alibaba bosses 《Jetpack Compose From entry to mastery 》, Hand in hand to show you Compose The style of .
The purpose of this information is to give hope to know 、 Study 、 application Jetpack Compose A reference for my little partner , Hope to help you who are studying ! need 《Jetpack Compose From entry to mastery 》 The full version of the little partner can click on the card at the end of the text to get it for free ! Guarantee free sharing !
《Jetpack Compose From entry to mastery 》
Catalog
Chapter one First time to know Jetpack Compose
Why do we need a new UI Tools ?
Jetpack Compose Focus on
- Accelerate development
- Powerful UI Tools
- Intuitive Kotlin API
API Design
Compose API Principles
- Everything is a function
- Top level function (Top-level function)
- Combination over inheritance
- Trust a single source
Deepen understanding Compose
- Core
- Foundation
- Material
slot API
Chapter two Jetpack Compose structure Android UI
Android Jetpack Compose The best guide to getting started
- Jetpack Compose Environmental preparation and Hello World Layout
- Use Material design Design
- Compose Real time preview of the layout
- ……
Go into detail Jetpack Compose | Optimize UI structure
- Compose The problem solved
- Composable Function analysis
- declarative UI
- Combine vs Inherit
- encapsulation
- restructuring
- ……
Go into detail Jetpack Compose | Realization principle
- @Composable What does annotation mean ?
- Execution mode
- Positional Memoization ( Place memory )
- Store parameters
- restructuring
- ……
The third chapter Jetpack Compose Project practice ( attach Demo)
Jetpack Compose application 1
- Preparation before start
- establish DEMO
- Problems encountered
Jetpack Compose application 2
- Jetpack Compose The application makes a countdown timer
- data structure
- Countdown function
- The state pattern
- Compose Layout
- Draw the clock
use Jetpack Compose Write a play Android App
- preparation
- Introduce dependencies
- newly build Activity
- establish Compose
- PlayTheme
- Draw page
- Bottom navigation bar
- Management status
- Add a page
use Compose Android Write a weather app
- Draw page
- Painting background
- Painting content
- ……
use Compose Quickly build a “ The movie App”
- finished product
- Implementation scheme
- actual combat
- Insufficient
- ……
Limited space , need 《Jetpack Compose From entry to mastery 》 The full version of the little partner can click on the card below to get it for free ! Guarantee free sharing !
版权声明
本文为[Programmer - Wu Yanzu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230423543221.html
边栏推荐
- Xiaomi, which has set the highest sales record of domestic mobile phones in overseas markets, paid renewed attention to the domestic market
- [AI vision · quick review of today's sound acoustic papers, issue 2] Fri, 15 APR 2022
- 1个需求的一生,团队协作在云效钉钉小程序上可以这么玩
- STM32F4单片机ADC采样及ARM-DSP库的FFT
- Shopping mall for transportation tools based on PHP
- Difference between LabVIEW small end sequence and large end sequence
- 【BIM入门实战】Revit建筑墙体:构造、包络、叠层图文详解
- 【论文阅读】【3d目标检测】Improving 3D Object Detection with Channel-wise Transformer
- Qt程序集成EasyPlayer-RTSP流媒体播放器出现画面闪烁是什么原因?
- Matlab minimalist configuration of vscode configuration
猜你喜欢
指纹Key全国产化电子元件推荐方案
那些年我面试过的Android开发岗总结(附面试题+答案解析)
STM32上μC/Shell移植与应用
matlab读取多张fig图然后合并为一张图(子图的形式)
VSCode配置之Matlab极简配置
[AI vision · quick review of today's sound acoustic papers, issue 2] Fri, 15 APR 2022
A function second kill 2sum 3sum 4sum problem
STM32 upper μ C / shell transplantation and Application
matlab讀取多張fig圖然後合並為一張圖(子圖的形式)
383. 赎金信
随机推荐
IEEE Transactions on Systems, Man, and Cybernetics: Systems(TSMC)投稿须知
Leetcode->1 两数之和
【论文阅读】【3d目标检测】point transformer
Express middleware ② (classification of Middleware)
QtSpim手册-中文翻译
协程与多进程的完美结合
Express中间件①(中间件的使用)
【Echart】echart 入門
[Li Hongyi 2022 machine learning spring] hw6_ Gan (don't understand...)
MATLAB lit plusieurs diagrammes fig et les combine en un seul diagramme (sous forme de sous - Diagramme)
【ICCV 2019】MAP-VAE:Multi-Angle Point Cloud-VAE: Unsupervised Feature Learning for 3D Point Clouds..
/etc/bash_completion.d目录作用(用户登录立刻执行该目录下脚本)
Stm32f4 MCU ADC sampling and FFT of ARM-DSP Library
顺序表的基本操作
LabVIEW 小端序和大端序区别
229. 求众数 II
指纹Key全国产化电子元件推荐方案
AWS EKS 部署要点以及控制台与eksctl创建的差异
How to regulate intestinal flora? Introduction to common natural substances, probiotics and prebiotics
【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space