Justin Becker
Justin Becker

Reputation: 53

How to change the position of the search button in Leanback's BrowseSupportFragment

I'm using the BrowseSupportFragment from Google's Leanback library, and am having significant trouble changing the placement of the Search Orb View. I know that they must be defining the placement of the search icon in some file, but I can't track it down.

This is what I have now: enter image description here

This is what we need: enter image description here

Upvotes: 1

Views: 521

Answers (1)

Justin Becker
Justin Becker

Reputation: 53

Hacky workaround I found, add this to your styles.xml:

<style name="Widget.Leanback.SearchOrbViewStyle">
    <item name="android:paddingLeft">770dp</item>
    <item name="searchOrbIcon">?attr/defaultSearchIcon</item>
    <item name="searchOrbColor">?attr/defaultSearchColor</item>
    <item name="searchOrbIconColor">?attr/defaultSearchIconColor</item>
    <item name="searchOrbBrightColor">?attr/defaultSearchBrightColor</item>
</style>

Upvotes: 1

Related Questions