androidx.appcompat.widget.SearchView
If you use androidx.appcompat.widget.SearchView:
You can hide the icon using this:
val magImage = searchView.findViewById(androidx.appcompat.R.id.search_mag_icon) as ImageView
magImage.layoutParams = LinearLayout.LayoutParams(0, 0)