addHeaderView

open fun addHeaderView(@LayoutRes layoutRes: Int)

Adds the specified View layout resource, to appear at the top of the . If the view already has a header view attached to it, it will be removed first.

Parameters

layoutRes

the unique resource identifier to the layout that should be attached.

See also


open fun addHeaderView(@NonNull headerView: View)

Adds the specified View if any, to appear at the top of the NavigationRailView. If the view already has a header view attached to it, it will be removed first.

Parameters

headerView

reference to the View that should be attached.

See also