so I'm new to Kotlin. Been working in it for a few weeks. I am currently trying to figure out how to remove the blue banner header thingy. When I try to remove the banner using headersState = BrowseSupportFragment.HEADERS_DISABLED it makes the whole page go blank.
This is what it looks like with the HEADERS_ENABLED
private fun setupUIElements() {
//title = getString(R.string.browse_title)
// over title
headersState = BrowseSupportFragment.HEADERS_ENABLED
isHeadersTransitionOnBackEnabled = true
// set fastLane (or headers) background color
brandColor = ContextCompat.getColor(activity!!, R.color.fastlane_background)
// set search icon color
searchAffordanceColor = ContextCompat.getColor(activity!!, R.color.search_opaque)
}
Screen Shot with Header Enabled
This is what it looks like when I set headersState = BrowseSupportFragment.HEADERS_DISABLED
Screen shot with Header Disabled
Basically I'm trying to get it to show all the video's with out the blue thing on the left.
I think this function might have something to do with the issue, but I'm not 100% sure.
private fun loadRows() {
val list = MovieList.list
val rowsAdapter = ArrayObjectAdapter(ListRowPresenter())
val cardPresenter = CardPresenter()
for (i in 0 until NUM_ROWS) {
if (i != 0) {
Collections.shuffle(list)
}
val listRowAdapter = ArrayObjectAdapter(cardPresenter)
for (j in 0 until NUM_COLS) {
listRowAdapter.add(list[j % 5])
}
val header = HeaderItem(i.toLong(), MovieList.MOVIE_CATEGORY[i])
val row_list = ListRow(header, listRowAdapter)
rowsAdapter.add(row_list)
}
adapter = rowsAdapter
}