Custom Lean back adaper for tv developers

Overview

CustomLeanBackAdapter

Custom Lean back adaper for tv developers

Installation:

Add in root gradle:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

Add in app gradle:

dependencies {
  implementation 'com.github.Usman-Nazir:CustomLeanBackAdapter:1.0.0'
}

Usage:

var items:MutableList< MenuItems> = arrayListOf()
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
items.add(MenuItems("Abc", arrayListOf("Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc","Abc","ABc"),RowTags.MOVIES.name , com.swipe.custom_leanback_adapter.R.layout.item_movies))
LeanBackAdapter(this)
     .withScaleY(1.15f)
     .withRecyclerView(binding?.leanBackAdapter)
     .loadItems(items, verticalRowBind = {item ,rowType, binding->
         when(rowType){
                RowTags.MOVIES.name->{
                    (binding.dynamicRecyclerView.adapter as? MultiHorizontalAdapter)?.updateData(item.helperObj as MutableList<Any>, rowType!!)
                }
         }
     }, clickListener = { item, rowType ->

     }, horizontalRowBind = {item ,rowType ,view ,layoutResource->

     })
     
      //defining tag for each row   
     enum class RowTags {
        MOVIES, DRAMAS
     }

image

You might also like...
IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.
IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts.

IconicDroid IconicDroid is a custom Android Drawable which allows to draw icons from several iconic fonts. Try out the sample application on the Googl

Set custom font in Android application

MagicViews Provides a simple way to set custom font in Android application. Adding to your project Add the library as a dependency to your build.gradl

A beautiful Android custom View that works similar to a range or seekbar. With animations.
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

An android custom view that displays a circle with a colored arc given a mark
An android custom view that displays a circle with a colored arc given a mark

MarkView An android custom view that displays a circle with a colored arc given a mark. Usage Add as a dependency compile 'com.github.xiprox.markv

Custom UI control for android which is showing data as a segments and a value inside them.
Custom UI control for android which is showing data as a segments and a value inside them.

Segmented Bar View for Android Custom UI control for android which is showing data as a segments and a value inside them. Screenshots Install From rep

This is a android custom view , like a scratch card effect!
This is a android custom view , like a scratch card effect!

ScratchView This is a android custom view , like a scratch card effect! Last Update 采纳DearZack童鞋的优化思路,把计算擦除面积比例的操作放在手指离开屏幕时,以降低对CPU的占用。 Articles Scrat

An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

a custom view that provides dragged and scaled
a custom view that provides dragged and scaled

DragScaleCircleView A custom imageview that provides the circle window can be dragged and scaled, crop image. How does it look? Why? Sometimes need to

 NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪
NumberPickerView - Custom Android View to provide a user friendly way of picking numbers. 🧪

🚀 Custom view for Android which provides a modern design and gestures for picking numbers in a user friendly way.

Releases(1.0.0)
Owner
null
Nature takes back over.

ShatteredReclamation This is a plugin that allows the wild to slowly take player creations back over. Config Threads This plugin uses multiple threads

ShatteredSoftware 3 Jul 15, 2022
Android App that communicates with a back-end server to display different One Piece characters

About This project is an Android App that communicates with a back-end server to display different One Piece characters. It's roughly based on this co

Sam Garcia 1 Feb 4, 2022
Android layout decorators : Injecting custom attributes in layout files, Using decorators to get rid of unnecessary class explosion with custom views

Decor Decor is a library that applies decorators to Android layout with additional attributes without the need to extend and create a custom View for

Mouna Cheikhna 304 Nov 25, 2022
We are not Gif makers, We are developers

We are not Gif makers, We are developers Recently me and my friend came across this downloading animation on Dribble: https://dribbble.com/shots/18878

Thibault Guégan 1.7k Nov 28, 2022
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.

CreditCard View CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card. Displaying and en

Vinay Gaba 769 Dec 14, 2022
Useful library to use custom fonts in your android app

EasyFonts A simple and useful android library to use custom fonts in android apps without adding fonts into asset/resource folder.Also by using this l

Vijay Vankhede 419 Sep 9, 2022
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

Iiro Krankka 8.4k Dec 29, 2022
Custom android music player view.

InteractivePlayerView Custom android music player view. Screen Check it on youtube Usage(XML) Define it in your xml file. <co.mobiwise.library.Intera

Mert Şimşek 744 Dec 25, 2022
Android Library for Custom Switches.

Android Library for Custom Switches.

Angad Singh 376 Jan 4, 2023
Custom wheel widget for android

Wheel widget for Android To include the wheel widget in the current layout, you should add in the layout xml this lines: <it.sephiroth.android

Alessandro Crugnola 384 Nov 21, 2022