Android Weekly Notes #487 Android Weekly Issue #487

Android Weekly Issue #487

Jetpack Compose with Robot Testing Pattern

Jake Wharton早年關於robot testing的文章. https://jakewharton.com/testing-robots/

感覺這篇文章主要講的內容是對測試工具的封裝.

Synchronize RecyclerView with TabLayout

RecyclerView和Tab結合, 例子是表情包選擇器.

每次選tab都切換到對應的section.

Library: https://github.com/Ahmad-Hamwi/TabSync

How to create a truly custom theme in Jetpack Compose

Compose Theme的官方文檔: https://developer.android.com/jetpack/compose/themes

還有一個codelab:
https://developer.android.com/codelabs/jetpack-compose-theming#0

但是一般app會有自己的design system, 所以還是需要自己的theme.

object AppTheme {

    val colors: AppColors
        @Composable
        @ReadOnlyComposable
        get() = LocalColors.current

    val typography: AppTypography
        @Composable
        @ReadOnlyComposable
        get() = LocalTypography.current

    val dimensions: AppDimensions
        @Composable
        @ReadOnlyComposable
        get() = LocalDimensions.current
}

字體也是一樣, 最後用了:

internal val LocalTypography = staticCompositionLocalOf { AppTypography() }

Apply special effects to images with the CameraX Extensions API

camera-extensions API的特效.

callback-ktx

這個庫: https://github.com/sagar-viradiya/callback-ktx

變callback爲suspend擴展方法.

目前cover了:

  • Animation
  • Location
  • RecyclerView
  • Sensor
  • View
  • Widget(TextView)

How to use an in-memory database for testing on Ktor

ktor的in memory database.

測試.

25 Best Android Libraries, Projects, and Tools You Won’t Want to Miss Out in 2021

之前的同系列文章:

這種盤點還挺有意思的.

Rx to Coroutines Concepts, Part 2.1: Exceptions

相關的系列文章還有:
https://code.cash.app/rx-to-coroutines-concepts-await-and-channels

Coroutine scope functions

這個得好好看一下.

7 things you should know before using Jetpack Compose

都是簡單問題.

Code

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章