A small problem with Edittext alignment.
I want the text to be Vertical_Center and Horizontal_Right. Using the designer I always end up with Vertical _Top no matter what the setting.???
In code when I use Gravity.Vertical_Center it is also Horizontal_Left.
I can't figure out how to use two gravity parameters in code. Is this possible?
[The padding is set to zero.]
Sub Globals
Private EditText1 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
EditText1.SetTextAlignment("CENTER", "RIGHT")
End Sub
I've tried it with the designer and it works properly.
Yes.
Best option is to use B4XView when you can:
B4X:
Sub Globals
Private EditText1 As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
EditText1.SetTextAlignment("CENTER", "RIGHT")
End Sub