OverviewDependency injection is a programming pattern which prescribes that classes do not construct instances of their dependencies, instead such instances are provided. This pattern enables separation of concerns, and increases testability, reusability, and ease of maintenance. See Dependency injection in Android to review the benefits of dependency injection and its core concepts. You may alrea
TL;DR To prevent synchronization issues and unexpected behaviors: – Avoid delays/asynchronous behaviors between typing and updating TextField state. – Avoid holding TextField state using a reactive stream (e.g. collecting from StateFlow using the default dispatcher) – Define TextField state variables with Compose APIs like MutableState<String>.Hoist TextField state to the ViewModel when needed e.g
At ADS ’22, I shared a migration strategy from existing View-based apps to Compose. In this blog post, we take a look at how to apply that strategy in practice by completing the migration of the Sunflower sample app to Compose. Screenshots of SunflowerOn your mark: The starting pointBefore jumping into how we went about migrating the app, it’s helpful to “set the scene” and see what the starting p
いつもSkebをご利用いただき、誠にありがとうございます。 12月23日12時よりskeb.jpにアクセスできない大規模な障害が発生しておりましたが、12月24日07時に復旧いたしました。 12月23日、および12月24日が納品期限のリクエストは納品期限を12月25日23時59分までに延長させていただきます。 みなさまには多大なご迷惑をお掛けしましたことをお詫び申し上げます。 本障害につきまして詳細をご報告させていただきます。 概要日時: 12月23日12時22分〜12月24日7時00分 (JST) ダウンタイム: 18時間38分 内容: skeb.jpにアクセスできない不具合 原因: SkebはすべてのサーバとシステムをHerokuに設置していたが、障害発生時刻より同サービスのアカウントが理由の通知なく利用できなくなった。 解決: Herokuの一切の利用を中止し、すべてのサーバとシステ
ViewModel events are actions originated from the ViewModel that the UI should perform. For example, displaying an informative message to the user, or navigating to a different screen when the application state changes. Our guidance on ViewModel events is opinionated in two different ways: Whenever a one-off event originates in the ViewModel, the ViewModel should handle that event immediately causi
Flutter Interact ’19 での “Flutter Octopus” よりFlutterは、Android・iOS・Web・Windows・macOS・Linux・Fuchsia の7プラットフォームに対応するマルチプラットフォームフレームワークですが、それらの分岐対応などのためにPlatform判定することがあります(Flutterフレームワーク内でしてくれる対応だけで済むことが多く自前で書く機会は少なめですが)。 その際、いくつか判定方法があり、その扱いに迷ったり適当に勘で済ませてしまうこともありがちだと思うので、この記事で体系的に整理しながら解説します。 また、Platformに関する値がそれぞれの実行環境でどうなるのか、カスタマイズ可能な値を弄るとそれがどう作用するのか、を以下のサンプルで試せるように用意したので適宜活用ください。 デモアプリ: https://flu
いつもSkebをご利用いただきありがとうございます。 2023年10月1日よりインボイス制度(適格請求書等保存方式)が開始されます。現行のインボイス制度に関するSkebの対応をお知らせいたします。 このお知らせはインボイス制度の解説を含み、非常に長い説明となっているため、先に要点を記載させていただきます。 要点Skebは現行のインボイス制度に強く反対します。インボイス制度は「クリエイターの本名がファンにバレる問題」「消費税の納税義務を負うか、取引が不利になるか二択を迫られる問題」「事務負担が増える問題」などクリエイターのみなさんにとって問題点が多く、十分な議論がなされないまま開始されようとしています。Skebでは特例制度を活用し、上記の問題を解決します。 Skebを利用する取引に限っては、クリエイターのみなさんの本名が登録番号経由でクライアントのみなさんにバレたり、インボイスに対応していな
Have you ever measured the performance of your composable and discovered it is recomposing more code than you expect? “I thought Compose was meant to intelligently skip composables when state hasn’t changed?” you might ask. Or when reading Compose code you might see classes annotated with @Stable or @Immutable and wonder what those mean? These concepts can be explained by Compose stability. In thi
In the following posts from our Jetpack DataStore series, we will cover several additional concepts to understand how DataStore interacts with other APIs, so that you’d have everything at your disposal to use it in a production environment. In this post, we will be focusing on Kotlin serialization. We will be referring to the Preferences and Proto codelabs throughout this post, for code samples. D
In part 2 of the Cancellation and Exceptions in Coroutines series, we learnt the importance of cancelling work when it’s no longer needed. On Android, you can use the CoroutineScopes provided by Jetpack: viewModelScope or lifecycleScope that cancel any running work when their scope completes — that is when the Activity/Fragment/Lifecycle completes. If you’re creating your own CoroutineScope, make
Following coroutine’s best practices, you might need to inject an application-scoped CoroutineScope in some classes to launch new coroutines that follow the app lifecycle or to make certain work outlive the caller’s scope. In this article, you’ll learn how to create an application-scoped CoroutineScope using Hilt, and how to inject it as a dependency. To further improve the way we work with Corout
In an Android app, Kotlin flows are typically collected from the UI layer to display data updates on the screen. However, you want to collect these flows making sure you’re not doing more work than necessary, wasting resources (both CPU and memory) or leaking data when the view goes to the background. In this article, you’ll learn how the Lifecycle.repeatOnLifecycle, and Flow.flowWithLifecycle API
You might have had the problem where a RecyclerView loses the scroll position when your Activity/Fragment is re-created. This usually happens because the Adapter data is loaded asynchronously and data hasn’t loaded by the time RecyclerView needs to layout so it fails to restore the scroll position. Starting with 1.2.0-alpha02, RecyclerView offers a new API to let the Adapter block layout restorati
New in Android 11 is the ability for apps to create seamless transitions between the on screen keyboard being opened and closed, and it’s all powered by lots of improvements to the WindowInsets APIs in Android 11. Here you are two examples of it in action on Android 11. It has been integrated into the Google Search app, as well as the Messages app: Two examples of keyboard animations in Android 11
DroidKaigi 代表理事 mhidaka です。 この活動報告は新型コロナウイルス感染症の影響によって2020年2月のDroidKaigi 2020が中止した影響をまとめています。 DroidKaigi 2020の中止を受けて2020年7月の今もなお新型コロナウイルス感染症は社会へ大きな影響を与えています。技術カンファレンスも変化せざるをえません。本記事は今一度、開発者・企業・IT業界の関係各位がカンファレンスの有り様について考えるきっかけとなればという気持ちで公開します。我々の至らないところも目立ちますが、広く共有することで業界に役立ってほしいと考えています。 この中止でご迷惑をおかけした講演者、一般参加者、アプリ開発にコントリビュートした開発者、協賛企業、取引企業、カンファレンスに関わった皆さんにとって残念な結果となったことを改めて、お詫び申し上げます。 DroidKaigi実行
Interested in looking at the source code for or contributing to Jetpack libraries, and you like Github? We have something for you. In 2018, Jetpack library development moved to the Android Open Source Project to increase transparency and enable external contributions. Since then, we’ve continued to invest in quality-of-life improvements for Jetpack contributors while moving more work-in-progress c
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く