Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
How do i create leanback layout with banner

I want layout something like in this picture

custom leanback layout

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);
    }
}
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!