1. Trang chủ
  2. » Công Nghệ Thông Tin

AndroidX Migration for Android developer

24 13 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 24
Dung lượng 1,09 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Introduction to new comingAndroidX libraries Anh.Tran @Android team 07/09/2018... Android JetPack a flash introduction... AndroidX - What is it?What different between Android Jetpack and

Trang 1

Introduction to new coming

AndroidX libraries

Anh.Tran @Android team

07/09/2018

Trang 2

1 Quick introduction of Android JetPack

2 AndroidX library

3 Demo

Trang 3

1 Android JetPack (a flash introduction)

● Google IO 2018

● https://developer.android.com/jetpack/

Trang 4

1 Android JetPack (a flash introduction)

Trang 5

AndroidX - What is it?

What different between Android Jetpack and AndroidX?

Trang 6

AndroidX - What is it?

What different between Android Jetpack and AndroidX?

Android Jetpack

Set of libraries, provide recommendation and tools to let you create a good app.

AndroidX

AndroidX is a library itself, which is its feature might or might not in Android Jetpack

(KTX and Slices are the AndroidX features and both also in Android Jetpack)

AndroidX = Support libraries + Refactor

Trang 7

Why need refactoring?

Trang 8

v4, v7, v13, ….

v-x, by the x, mean minimum SDK support So “v-4” support until SDK level 4.

v4 Support Library is for Android 1.6 (API level 4) Android 2.3 (API level 9) Android 4.0 (API

level 14) and higher.

v7 Support Library is for Android 2.1 (API level 7) Android 2.3 (API level 9) Android 4.0 (API

level 14) and higher.

v13 Support Library is for Android 3.2 (API level 13) and higher However, the new features in

v13 have depicted already.

https://stackoverflow.com/questions/18271429/difference-between-android-support-v7-appcom pat-and-android-support-v4

Trang 9

v4, v7, v13, ….

https://stackoverflow.com/questions/15109017/difference-between-android-app-fragment-and-a ndroid-support-v4-app-fragment

Trang 10

So

… it’s time to refactor

Trang 11

AndroidX ~ Android eXtension libraries

android.* - class which are bundled with the operating system and

can have different APIs and behavior for different Android versions.

androidx.* - Classes like AppCompatActivity or ViewModel, which

are unbundled from the operating system and ship in your apk These

libraries are written to provide a single API surface with behavior

that's as consistent as possible across Android versions.

Trang 12

1 no more v-4 v-7 v-13 v-14

2 Android android.* and androidx.*

3 Reset version back to `1.0.0`

Trang 13

How to migration to AndroidX

AS 3.2 Beta

Trang 14

After migration

Trang 15

Demo time

Let’s try with our Quoinex Android project!

Trang 20

Issues after migration

Trang 21

About versioning

Still multiple numbers of version (1.0.0, 2.0.0, …)

Trang 22

Still not stable

Trang 23

1 ‘AndroidX’ is just a refactor of support libraries and

versioning

2 Quoinex app can be migrated to ‘androidX’ with only

some issues fixes (ButterKnife, Test, …)

3 ‘AndroidX’ is still not stable for production Should

wait Google for next announcements

Trang 24

Thank you!

Ngày đăng: 03/03/2021, 15:16

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN