This project is a fork of the original repository
In this fork, the following improvements have been made:
- Updated the Gradle version and dependencies to their latest stable versions.
- Converted the original Java codebase to Kotlin for better interoperability and modern language features.
- leanback support for Android TV
epg-recording.mp4
This is a "classic" TV EPG which works on tablets and phones and allows you to scroll in all directions (horizontal, vertical and diagonal). Example project is located in repo but in short you need to add the EPG to your xml or by code:
<com.abmo.tvepg.epg.EPG
android:id="@+id/epg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/epg_background"/>
Then by code adding a click listener...
epg.setEPGClickListener(object : EPGClickListener {
override fun onChannelClicked(
channelPosition: Int,
epgChannel: EPGChannel?) {
}
override fun onEventClicked(
channelPosition: Int,
programPosition: Int,
epgEvent: EPGEvent?) {
}
override fun onResetButtonClicked() {
}
})
... and data to be shown.
epg.setEPGData(EPGDataImpl(MockDataService.mockData))
That's basically it. If you want to use it in your project you need resources from the example project as well as the epg package for it to work. If you have any questions or such don't hesitate to contact me.
Good luck!