MaterialSearchBar icon indicating copy to clipboard operation
MaterialSearchBar copied to clipboard

How to change my search bar to be transparent background?

Open burkaslarry opened this issue 5 years ago • 0 comments

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<MaterialSearchBar>(R.id.searchBar) as MaterialSearchBar
        topSearchBar.placeHolderView.setBackgroundColor(Color.TRANSPARENT)
        topSearchBar.searchEditText.setBackgroundColor(Color.TRANSPARENT)
        topSearchBar.setPlaceHolderColor(Color.TRANSPARENT)
        //topSearchBar.searchBar
        return rootView
    }

burkaslarry avatar Mar 06 '19 12:03 burkaslarry