当前位置:网站首页>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
边栏推荐
猜你喜欢
【测绘程序设计】坐标方位角推算神器(C#版)
[AI vision · quick review of NLP natural language processing papers today, issue 31] Fri, 15 APR 2022
Thought of reducing Governance -- detailed summary of binary search
Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
[AI vision · quick review of robot papers today, issue 32] wed, 20 APR 2022
STM32F4单片机ADC采样及ARM-DSP库的FFT
A new method for evaluating the quality of metagenome assembly - magista
一个函数秒杀2Sum 3Sum 4Sum问题
229. 求众数 II
LabVIEW 小端序和大端序区别
随机推荐
win10, mysql-8.0.26-winx64.zip 安装
STM32 MCU ADC rule group multi-channel conversion DMA mode
Cortex-M3寄存器组、汇编语言与C语言的接口介绍
520.检测大写字母
[mapping program design] coordinate azimuth calculation artifact (version C)
【李宏毅2022 机器学习春】hw6_GAN(不懂..)
【时序】基于 TCN 的用于序列建模的通用卷积和循环网络的经验评估
华为机试--高精度整数加法
STM32单片机ADC规则组多通道转换-DMA模式
A function second kill 2sum 3sum 4sum problem
兼容NSR20F30NXT5G的小体积肖特基二极管
Xshell、Xftp连接新创建的Unbutu系统虚拟机全流程
229. 求众数 II
Shopping mall for transportation tools based on PHP
第四章 --- 了解标准设备文件、过滤器和管道
QT program integration easyplayer RTSP streaming media player screen flicker what is the reason?
STM32 upper μ C / shell transplantation and Application
Alibaba cloud IOT transfer to PostgreSQL database scheme
Second kill all interval related problems
那些年我面试过的Android开发岗总结(附面试题+答案解析)