How can I hide the EditText underbar (the prompt line with little serifs at the ends)?
There might be a better way to do what I want: I have a layout with an EditTe
An other option, you can create your own custom EditText like this :
class CustomEditText : androidx.appcompat.widget.AppCompatEditText {
constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)
private val paint = Paint()
private val path = Path()
init { // hide your underbar
this.setBackgroundResource(android.R.color.transparent)
// other init stuff...
}
override fun onDraw(canvas: Canvas?) {
super.onDraw(canvas)
// draw your canvas...
}
}