How can I remove the searchOrbView in the BrowseFragment of Android TV?
I see a way to set the colors (setSearchAffordanceColors), but no way to actually remove the SearchOrbView
Since the TitleView is a private member of BrowseFragment (and TitleView is the way to get to the SearchOrbView), I see no way of actually removing the SearchOrbView
According to the official documentation, calling setOnSearchClickedListener()
causes the search orb to be displayed in the title view.
Removing the method invocation will make the orb disappear.
For those who doesnt read comments
you can simply achieve that defining a new style with Theme.Leanback.VerticalGrid as parent and setting item browseRowsMarginTop to any dp value you need. Then set this theme for the Activity implementing the vertical grid view. – fasteque
It helped me. style.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="@style/Theme.Leanback"></style>
<style name="NoTitleTheme" parent="@style/Theme.Leanback">
<item name="browseRowsMarginTop">5dp</item>
</style>
</resources>
AndroidManifest.xml ....
<activity
android:name=".stackedadprogram.StackedAdProgramActivity"
android:exported="true"
android:parentActivityName=".launcher.ProgramDetailActivity"
android:theme="@style/NoTitleTheme" />
....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With