Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

Pic by Tania MT with ❤What is buildSrcbuildSrc is a directory at the Gradle project root, which can contain our build logic. This allows us to use the Kotlin DSL to write our custom build code with very little configuration and share this logic across the whole project. This has become very popular in recent years and it is a common practice to define project-specific tasks or storing dependencies
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
Philipp Hauer's Blog Engineering Management, Java Ecosystem, Kotlin, Sociology of Software Development Posted on Feb 12, 2018. Updated on Jun 12, 2022 Unit Testing in Kotlin is fun and tricky at the same time. We can benefit a lot from Kotlin’s powerful language features to write readable and concise unit tests. But in order to write idiomatic Kotlin test code in the first place, there is a certai
マルチモジュールが最近では当たり前になってきましたが、モジュールが増えるたびに build.gradle も増えてきます。 これらをメンテナンスしていくのも工夫が必要になってきます。何度も同じ設定を書くことになるため、それらを共通化する必要もあります。 Gradleの設定を共通化するにはいくつか方法がありますが、今回はプロジェクト固有のカスタムPluginで共通化する方法を簡単に紹介します。 Script plugins と Binary plugins説明の前にPluginの種類について補足しておきます。 Applying a plugin to a project allows the plugin to extend the project's capabilities. It can do things such as: Extend… Script pluginsが apply
Update: June 17, 2024 — The Jetpack Security crypto library has been deprecated. This means that it is no longer being actively developed or supported by Google. As a result, it is recommended that you migrate to a different library for your encryption needs. There are a number of alternative libraries available, such as: Android KeyStore: This is the built-in key store on Android devices. It prov
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
Every annotation has a point 🔍! Check out these cheat sheets to understand how Dagger interprets them and the code it generates for you. Explanations about the generated code and Dagger annotations can be found in the cheat sheets as comments. For more information about dependency injection, why you might use Dagger in your Android app, and how to use it, check out the official Android documentat
Over the past two years, I have regularly come across articles and libraries that attempt to improve how underline text decorations are rendered on the web. The same problem exist on Android: underline text decorations cross descenders. Compare how Android draws underlined text (top) and how it could be drawn instead (bottom): Which do you prefer?While I wholeheartedly approve of these efforts, I
Activity 1.2.0-alpha02 と Fragment 1.3.0-alpha02 から ActivityResultContract が追加されました。 ActivityResultContract を使うことで、従来の onActivityResult とは違った方法でActivityの結果を受け取ることが可能になります。 ActivityResultContracts にいくつか用意されてるものがあります。 build.gradleimplementation "androidx.activity:activity-ktx:1.2.0-alpha02" implementation "androidx.fragment:fragment-ktx:1.3.0-alpha02"注意実装時の注意は別の記事で書きましたので、合わせて確認してください。
新型コロナウイルスによって中止となった DroidKaigi 2020 にて2日目11:00より発表予定だった「詳解 WindowInsets」の資料です
日本の英語教育はとかく文法偏重と批判されますが、その反動なのか、読解・訳読・英文法中心の受験英語をやたら絶賛する人たちがいます。中高校で6年間も英語を習ったのにろくに英語ができないのは受験英語のせいではなく、受験英語をちゃんとマスターしていないからという主張をする人たちです。彼らによれば、受験英語をしっかり習得していれば正しい英語を書けるようになるし、多少慣れればすぐに英語をしゃべれるようになれるそうです。しかし、確かに英文法の習得は大事ですが、それだけで英文をスラスラ書けるようになるわけはありません。日本の英語教育はとかく「読み書き中心」と揶揄されますが、実際には「読み中心」であって、英語ライティングの指導はほとんどなされていません。受験英語をしっかりやれば読解力はそれなりにつきますが、ライティングに関しては生徒はおろか英語教師でさえろくにできないというのが実情です。にもかかわらず受験英
This blog post explores references, a mechanism used by the ECMAScript language specification to explain the difference between the following two expressions: obj.prop() (0, obj.prop)() Method calls versus function calls # Consider the following object: var obj = { getThis: function () { "use strict"; return this; }, }; If you call obj.getThis, you have a method call (this points to the object in
Intro Cookie は、ブラウザに一度保存すれば、次からその値を自動的に送ってくるという、非常に都合の良い仕様から始まった。 State Less が基本だった Web にセッションの概念をもたらし、今ではこれが無ければ実現できないユースケースの方が多い。 冷静に考えればふざけてるとして思えないヘッダ名からもわかるように、当初はこのヘッダがこんなに重宝され、Web のあり方を変えるかもしれないくらい重要な議論を巻き起こすことになるとは、最初の実装者も思ってなかっただろう。 そんな Cookie が今どう使われ、3rd Party Cookie (3rdPC) の何が問題になっているのかを踏まえ、これからどうなっていくのかについて考える。 Cookie のユースケース Web にある API の中でも Cookie はいくつかの点で特異な挙動をする 一度保存すれば、次から自動で送る 現
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く