I created this demo project to demonstrate a bug that I encountered when trying to make a custom titlebar for my project.
- Created a new Tv project from Android Studio
- Copied the the methods described in the leanback showcase demo to create a Custom Titlebar
https://github.com/googlesamples/leanback-showcase
- Created
themes.xml
with the exact same values as in the leanback showcase - Copied the views:
custom_titleview.xml
andtitleview.xml
- Copied
CustomTitleView.java
- Changed the
AndroidManifest.xml
to reference the theme for MainActivity
- In custom_titleview.xml I changed the SearchOrbView id from
android:id="@+id/search_orb"
toandroid:id="@+id/search_orb2"
- In CustomTitleView.java I changed:
mSearchOrbView = root.findViewById(R.id.search_orb2);