Android Question (Solved) EditText return key

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All,

When I try setting EditText auto-capitalize on using the code below, the return key disappears:
B4X:
    txtb.InputType = txtb.INPUT_TYPE_TEXT
    
    txtb.InputType = Bit.Or(txtb.InputType, 16384)

Is there a better way of doing this?

Thanks
iCAB
 

iCAB

Well-Known Member
Licensed User
Longtime User
Sorry Erel, I just noticed the following.
It is related to the fact that I am calling the function and passing the original control as a View:


B4X:
Sub LAY_TextBoxSetAutoCapitalizeFirstLetter( vView As View )
    Dim txtb As EditText = vView
    txtb.InputType = txtb.INPUT_TYPE_TEXT
    txtb.InputType = Bit.Or(txtb.InputType, 16384)
End Sub


If I use the code below instead of calling the function, the problem goes away:
B4X:
txtbOrgControl.InputType = txtbOrgControl.INPUT_TYPE_TEXT
txtbOrgControl.InputType = Bit.Or(txtbOrgControl.InputType, 16384)


Is there a workaround while using a View as a parameter?



Thanks,
iCAB
 
Upvote 0
Top