ぜのぜ

しりとりしようぜのぜのぜのぜ

234日目

日記

ローラー台を買う機運が高まってきた

今日書いたコード

holder.button?.setOnClickListener {
    val context = holder.view.context
    val intent = Intent(context, DetailActivity::class.java)
    Log.d("Action", intent.action.toString())
    Log.d("Categories", intent.categories?.joinToString().toString())
    intent.putExtra("letter", holder.button.text.toString())
    context.startActivity(intent)
}
2022-02-08 20:00:25.518 6280-6280/com.example.slovar D/Action: null
2022-02-08 20:00:25.518 6280-6280/com.example.slovar D/Categories: null

感想

昨日(?)作ったintentに関してintent filter設定してないよなと思ったがexplicit intentには関係なさそうだった。

The system delivers an implicit intent to your app component only if the intent can pass through one of your intent filters. https://developer.android.com/guide/components/intents-filters#Receiving