Skip to main content
  • About me
  • Some Thing
  • 首頁

Archive for 7 月 2025

  • viewModelScope vs rememberCoroutineScope 其實沒啥好 versus ,就是 SOC 職責分離

    viewModelScope vs rememberCoroutineScope 其實沒啥好 versus ,就是 SOC 職責分離

    2025-07-15

    viewModelScope:與 ViewModel 的生命週期綁定,只能用在資料/邏輯層。 rememberCoroutineScope:與 Composable 畫面元件的生命週期綁定,只能用在 …

    read more
  • Compose 三階段渲染管線

    Compose 三階段渲染管線

    2025-07-14

    核心三階段  Compose 將 UI 的生成與更新拆解為三個依序執行的獨立階段,以實現最大化的工作重用與性能優化。 組合 (Composition): 此階段的核心任務是執行 @Composable…

    read more
  • SupervisorJob 不就是 viewModelScope嗎?

    SupervisorJob 不就是 viewModelScope嗎?

    Job 不僅僅是 launch 的回傳值,它是我們管理 Coroutine 的「遙控器」。 Job : Job 是最基本的協定,它遵循嚴格的「結構化併發」原則。 特性:「一損俱損」。 在一個由標準 J…

    read more
  • Kotlin 如何預防 Launch 連發,搜尋任務

    Kotlin 如何預防 Launch 連發,搜尋任務

    不管處理何種問題,我們都必須考慮是出於何種場景,就像是 使用者在 1 秒內點了 10 次。由於 launch 的天性是「射後不理 (fire-and-forget)」,你的 App 也會忠實地啟動 1…

    read more
  • CreationExtras.inventoryApplication() 這有點跳

    CreationExtras.inventoryApplication() 這有點跳

    CreationExtras 到底是什麼? CreationExtras 是一個在 ViewModel 創建時自動附帶的「額外資訊包裹」。 以前,想給 ViewModel 傳參數(如 SavedSta…

    read more
  • fun GameScreen(gameViewModel: GameViewModel = GameViewModel()) 這樣寫有啥問題?

    fun GameScreen(gameViewModel: GameViewModel = GameViewModel()) 這樣寫有啥問題?

    直接 new GameViewModel() Kotlin class GameViewModel : ViewModel() { var score by mutableStateOf(0) ini…

    read more
  • inline, noinline, crossinline:存在即合理

    inline, noinline, crossinline:存在即合理

    老樣子,存在必合理,有這樣的 Keyword ,那肯定是前人有過不去的坎,所以才設計出這個要想一想的概念 問題:優雅的 Lambda,不堪重負的 GC Kotlin 的高階函數與 Lambda 是偉大…

    read more
  • 麻煩 ViewModelProvider.Factory 你了,因為系統不讓我直接 new 一個 ViewModel

    麻煩 ViewModelProvider.Factory 你了,因為系統不讓我直接 new 一個 ViewModel

    這個規範是為了解決 Android 元件生命週期不一致所帶來的大問題。 ## 保險箱 開發者 Activity/Fragment (UI 控制器):是您的「錢包」。您隨身帶著它,但它可能隨時會遺失、被…

    read more
  • id(“org.kotlin.xxxx”) version “2.1.0” apply false  這不要你還特地寫上去啊?.

    id(“org.kotlin.xxxx”) version “2.1.0” apply false 這不要你還特地寫上去啊?.

      假設我們的專案 MyPlayerApp 是一個音樂播放器,它有三個模組: app: 主應用程式模組,包含 UI 畫面。(需要 Compose) feature_playlist: 播放清單功能的模…

    read more
« Previous
1 2
  • analyze
  • android
  • Camera
  • dagger
  • debug
  • Facebook
  • FMRadio
  • Funny Vote
  • greendao
  • ios
  • java
  • kotlin
  • lib
  • MVP
  • overlay
  • plug
  • react native
  • retrofit2
  • SLAM
  • software
  • 整理
  • 書本
  • 爛裝置也想跑AI
  • 老文
  • 2025 年 8 月
  • 2025 年 7 月
  • 2025 年 6 月
  • 2025 年 5 月
  • 2025 年 4 月
  • 2025 年 3 月
  • 2025 年 2 月
  • 2025 年 1 月
  • 2024 年 4 月
  • 2022 年 3 月
  • 2021 年 9 月
  • 2021 年 5 月
  • 2017 年 4 月
  • 2017 年 2 月
  • 2016 年 12 月
  • 2016 年 11 月
  • 2016 年 10 月
  • 2016 年 9 月
  • 2016 年 8 月
  • 2016 年 7 月
  • 2016 年 6 月
  • 2016 年 4 月
  • 2016 年 3 月
  • 2016 年 2 月
  • 2016 年 1 月
  • 2015 年 11 月
  • 2015 年 10 月
  • 2015 年 9 月
  • 2015 年 8 月
  • 2015 年 7 月
  • 2015 年 6 月
  • 2015 年 5 月
  • 2015 年 3 月
  • 2015 年 2 月
  • @Immutable @Stable 如果 immutableList 內包含 list .這樣會造成 recompstion 嗎?
  • Hilt 指南 組內分享
  • Communicate with fragments
  • handle all repostiory operation that out of Composable/ViewModel scope
  • DisposableEffect 與 LifecycleEventObserver
Select a menu in the customizer
Blog Layouts WordPress Theme created by Rico