Skip to content

Instantly share code, notes, and snippets.

@ademirqueiroga
Created March 6, 2023 02:08
Show Gist options
  • Save ademirqueiroga/2681fffdc7fe732248064ef681b0786d to your computer and use it in GitHub Desktop.
Save ademirqueiroga/2681fffdc7fe732248064ef681b0786d to your computer and use it in GitHub Desktop.
MainFragment.kt
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val height = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 60f, resources.displayMetrics).toInt()
val headerPresenterSelector = headersSupportFragment.presenterSelector as ClassPresenterSelector
headerPresenterSelector
.addClassPresenter(IconSectionRow::class.java, IconSectionPresenter())
.addClassPresenter(DividerRow::class.java, SpaceDividerPresenter(height))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment