I'm using https://github.com/mancj/MaterialSearchBar to set a search bar with a menu burger. I can't change of API.
Here is what I obtained:
Questions
How to...:
Reduce the padding-left of the text?
Change the font-family of the latter?
Finally, disable boldness?
NB: these questions are completed by some others in the next section, According to the documentation.
According to the documentation
mt_aBCD
are the XML attributes that allow us to customize the search bar. However, the above ones don't exist. Their Java equivalent (setABCD
neither).
By the way, note that there isn't a lot of Github activity for this API. I can't replace the latter with another one. What solution would you give me?
- Should I change something in this API (is it authorized and legal)? (how?)
- Could I override the style? etc. (how?)
- Other?
My implementation
I edited my build file, then I simply added the search bar in my XML layout:
<com.mancj.materialsearchbar.MaterialSearchBar
android:id="@+id/material_search_bar"
style="@style/MaterialSearchBarLight"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginEnd="15dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
app:layout_constraintBottom_toBottomOf="@+id/toolbar"
app:layout_constraintEnd_toEndOf="@+id/toolbar"
app:layout_constraintStart_toStartOf="@+id/toolbar"
app:layout_constraintTop_toTopOf="@+id/toolbar"
app:mt_maxSuggestionsCount="10"
app:mt_navIconEnabled="true"
app:mt_placeholder="@string/search_placeholder" />