Hi guys,
I have a problem with EditText InputType in Custom View.
I have a layout with 2 Custom View, this Custom View basically is an EditText with border.
When I ran the app on a small screen (4 inch), here what happen on the second Custom View
1) if this Custom View is not in focused & clicked, this view raised up when Virtual Keyboard appeared, this is the expected result, I set this code in manifest editor
2) but if this Custom View is in focused & clicked, Virtual Keyboard appeared, but Custom view didn't raise up, so it was covered by Virtual Keyboard
I have tried to locate the problem & found out that is was caused by a call to an InputType on this sub on my Custom View codes
If I removed that line, it will behaved as expected, but Next/Done disappeared from Virtual Keyboard.
Can anyone helps me to fix this problem? Attached is a sample project to this problem.
Thanks in advance.
I have a problem with EditText InputType in Custom View.
I have a layout with 2 Custom View, this Custom View basically is an EditText with border.
When I ran the app on a small screen (4 inch), here what happen on the second Custom View
1) if this Custom View is not in focused & clicked, this view raised up when Virtual Keyboard appeared, this is the expected result, I set this code in manifest editor
B4X:
SetActivityAttribute(Main, android:windowSoftInputMode, "adjustPan|stateHidden")
2) but if this Custom View is in focused & clicked, Virtual Keyboard appeared, but Custom view didn't raise up, so it was covered by Virtual Keyboard
I have tried to locate the problem & found out that is was caused by a call to an InputType on this sub on my Custom View codes
B4X:
Public Sub setFieldType(Typ As Byte)
FldTyp = Typ
If(FldTyp = TypeText) Then
edt.Gravity = Gravity.LEFT+Gravity.CENTER_VERTICAL
edt.InputType = InpTypFirstCap 'this is the caused of a problem
else If(FldTyp = TypeInt Or FldTyp = TypeFloat Or FldTyp = TypeCurrency) Then
edt.Gravity = Gravity.RIGHT+Gravity.CENTER_VERTICAL
edt.Text = 0
End If
End Sub
If I removed that line, it will behaved as expected, but Next/Done disappeared from Virtual Keyboard.
Can anyone helps me to fix this problem? Attached is a sample project to this problem.
Thanks in advance.