Android Question [Solved] Remove underline in edit text

pacoMx

Member
Licensed User
Longtime User
Hi, I want to remove "underline" element in editText. How can I do it?

I'm trying to get a border around the text input, what I did is to have a panel and inside that panel the edit text. Now, my problem is that I can't find how to remove the default line that goes under edit text.

I want something something simialr to the "Name" input field.
iu
 

Matt S.

Member
Licensed User
I have SetColorAndBorder rather than SetBorderAndColor in version 12.80:
B4X:
    Dim mEditText As EditText
    mEditText.Initialize("mEditText")
    mEditText.As(B4XView).SetColorAndBorder(HColors.lightBlue, 3dip, HColors.Blue, 10dip)
    mEditText.TextColor = HColors.Black
    mEditText.TextSize = 20
    myPanel.AddView(mEditText, 10%x, 15%y, 30%x, 50dip)
 
Upvote 0

mohdosala

Member
this thread is also quite helpful: Change EditText Colors

Using that method mentioned in that link, you can get access to edit text placeholder color. Then you can change its alpha to 0. Therefore, it gets invisible.

B4X:
Dim a As XUI
a.Color_ARGB(0,0,0,0)
 
Upvote 0
Top