mancj / mancj/MaterialSearchBar

How to change my search bar to be transparent background?

Open
#108 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
324
PR merge metrics
No merged PRs in 30d

Description

I use fragment to set up search of my view. I want to set my icons to be white, set search bar to be transparent color. When it comes to execution, the search bar is still white. Would you please tell me what to do ?

Here is my code :

```
override fun onCreateView(inflater: LayoutInflater , container: ViewGroup? , savedInstanceState: Bundle?): View? {

val rootView = inflater.inflate(R.layout.fragment_main , container , false)
val topSearchBar = rootView.findViewById(R.id.searchBar) as MaterialSearchBar
topSearchBar.placeHolderView.setBackgroundColor(Color.TRANSPARENT)
topSearchBar.searchEditText.setBackgroundColor(Color.TRANSPARENT)
topSearchBar.setPlaceHolderColor(Color.TRANSPARENT)
//topSearchBar.searchBar
return rootView
}

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the onCreateView code in the issue and the MaterialSearchBar API, focusing on which view controls the rendered search-bar background and icons. Confirm the relevant behavior on an Android screen; done means the search bar background is transparent and its icons are white.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
design, mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.