01
Dev.to Kotlin
作者:Milan
發布:02-22 13:41
Stylo for Android: From Idea to Release
What began as a quick port became a production-quality Kotlin app with Jetpack Compose, MVVM, Room and hard-won optimizations for older devices.
重點摘要
Built as a production app with Kotlin, Jetpack Compose, MVVM, Hilt and Room
Optimized for low-end devices: fixed memory leaks, reduced recompositions, removed costly animations
Features offline history, Supabase auth, rate limits, Material Design 3 and tablet support
When Milan started the Android version of Stylo he expected a quick port but ended up building a production-grade app in Kotlin using Jetpack Compose, MVVM, Hilt and Room. The development included heavy optimization for older devices—hunting memory leaks, reducing Compose recompositions and removing costly animations—and a strict separation of layers paid off when adding offline mode without changing UI code. A security lapse taught the author to implement EncryptedSharedPreferences and AES‑256 for token storage. The app supports ten text transformations (grammar, formality, summarization, etc.) in five languages with auto-detect, local history via Room, rate limiting (6 requests/hr for visitors, 20 for logged-in users), Supabase authentication, Material Design 3 with dark mode, and tablet support. Beta testing is about to start and the author requests honest user feedback on crashes, slowness and confusing UX.
Stylo for Android:从构想到发布
原本想快速移植的计划最终演变为使用 Kotlin、Jetpack Compose 和 MVVM 构建的生产级应用,并在旧设备和安全性上投入大量优化。
重點摘要
使用 Kotlin、Jetpack Compose、MVVM、Hilt 与 Room 打造正式应用
修复记忆体泄漏、减少重组、去除高耗资源动画以适配旧机
具离线历史、Supabase 验证、接口限流与 Material Design 3 支持
作者 Milan 起初以为 Android 版 Stylo 可以一周完成,但实际开发耗费数月,做成了生产级应用:以 Kotlin、Jetpack Compose、MVVM、Hilt 与 Room 架构,為舊設備進行大量優化(包括修復記憶體泄漏、降低 Compose 重組次數並移除耗 CPU 的動畫),並在發現安全問題後用 EncryptedSharedPreferences 與 AES‑256 加密儲存金鑰。應用支援十種文字轉換、五種語言自動偵測、離線歷史、本地 Room 儲存、API 限流(訪客每時 6 次、已登入 20 次)、Supabase 認證、Material Design 3(含深色模式)和平板支援。作者正在招募 Beta 測試者,希望獲得真實回饋以修正崩潰、慢速與使用性問題。
Stylo for Android:從構想到上線
原本以為是一週就能完成的移植,最後變成以 Kotlin、Jetpack Compose 和 MVVM 建置的生產等級應用,並針對舊機種與安全做了大量優化。
重點摘要
以 Kotlin、Jetpack Compose、MVVM、Hilt 與 Room 建置生產級應用
為舊手機優化記憶體與重組次數,移除耗資源動畫提升效能
支援離線歷史、Supabase 認證、API 限流與 Material Design 3
作者 Milan 原本以為能在一週內完成 Stylo 的 Android 版,結果耗費數月才達成生產等級的成果:以 Kotlin、Jetpack Compose、MVVM、Hilt 與 Room 重構,針對舊機種優化記憶體與動畫、移除高耗資源效果,並補上加密的 SharedPreferences(AES‑256)以保護金鑰。功能包含十種文字轉換、五種語言自動偵測、離線歷史、API 限流(訪客 6 次/時、登入者 20 次/時)、Supabase 認證與 Material Design 3(含深色模式),且已支援平板。現正招募真實使用者進行 Beta 測試以回報錯誤與效能或使用性問題。