Remove underline from TextInputEditText

后端 未结 13 2160
我寻月下人不归
我寻月下人不归 2021-01-04 01:10

I have an android screen which takes email from the user. Below is the snippet of the code, I want to remove the underline which appears below the text.

<         


        
相关标签:
13条回答
  • 2021-01-04 01:48

    Make your custom TextInputLayout like this

    package com.google.android.material.textfield
    
    import android.content.Context
    import android.util.AttributeSet
    class TextInputLayoutWithoutUnderline @JvmOverloads constructor(
            context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
    ) : TextInputLayout(context, attrs, defStyleAttr) {
    
        override fun updateEditTextBackground() {
            // XXX don't call super on purpose
        }
    
    }
    
    0 讨论(0)
提交回复
热议问题