I want layout something like in this picture
I tried to add custom RowPresenter to the BrowseFragment's Adapter However I my custom view didn't cover full width with "match_parent" attribute,
And when focus shifts to items of ListRow banner of custom RowPresenter moves upward and gets hidden.
Here is the code
MainBrowseFragment ->
var rowPresenterSelector = ClassPresenterSelector();
rowPresenterSelector.addClassPresenter(ListRow::class.java,ListRowPresenter())
rowPresenterSelector.addClassPresenter(CustomRow::class.java,CustomRowPresenter())
arrayObjectAdapter = ArrayObjectAdapter(rowPresenterSelector)
arrayObjectAdapter.add(CustomRow());
Here is my Custom Row Presenter with custom view with banner.
class CustomRowPresenter: RowPresenter() {
override fun createRowViewHolder(parent: ViewGroup?): ViewHolder {
var view = LayoutInflater.from(parent!!.context).inflate(R.layout.layout_custom_row_presenter,null,false)
return ViewHolder(view);
}
}