Complete the missing parts so that you can apply the OffsetItemDecoration(spacingInDp: Int) to the recycler view.
ItemDecoration
Applying decorations
Report a typo
Fill in the gaps with the relevant elements
class MainActivity : {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val recycler = findViewById<>(R.id.recycler_view)
val offsetSizeInDp = resources.(R.dimen.offsets)
recycler.adapter = ItemRecyclerAdapter()
recycler.layoutManager = LinearLayoutManager(this)
recycler.(OffsetItemDecoration(offsetSizeInDp))
}
}Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.