Bug? After rotating with opened and closed keyboard 100%y has different values

b4auser1

Well-Known Member
Licensed User
Longtime User
I calculate Top value (to addView) as 100%y - Height.
I noticed that 100%y provides different values, if I rotate device with opened or closed virtual keyboard.
I tried to apply workaround and force IME.HideKeyboard in Public Sub Activity_Pause(UserClosed As
Boolean) if UserClosed = False then IME.HideKeyboard, but it didn't help.
 

b4auser1

Well-Known Member
Licensed User
Longtime User
Please find in the attached file.

B4X:
'To manage IME event: IME_HeightChanged
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
I use this attribute to manage positions of some views depended on keyboard is opened or closed.
There is no issue with different values of 100%y, if the windowSoftInputMode is not set.
 

Attachments

  • testY.zip
    6.1 KB · Views: 159

b4auser1

Well-Known Member
Licensed User
Longtime User
B4X:
Dim edt As EditText
    edt.Initialize("")
    edt.InputType = Bit.Or(edt.InputType, 524288)
   
    Activity.AddView(edt, 20dip, 50dip, 50dip, 40dip)

It didn't help.
 

b4auser1

Well-Known Member
Licensed User
Longtime User
There is no suggestion bar.

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")

    Log($"100%y <${100%y}>"$)

    Dim edt As EditText
    edt.Initialize("")
    edt.InputType = Bit.Or(edt.InputType, 524288)

    Activity.AddView(edt, 20dip, 50dip, 100dip, 40dip)
  
    edt.Text = 100%y
End Sub
 

Attachments

  • sshot-2015-08-18-[10-32-12].png
    sshot-2015-08-18-[10-32-12].png
    21.7 KB · Views: 182
  • sshot-2015-08-18-[10-33-12].png
    sshot-2015-08-18-[10-33-12].png
    23.3 KB · Views: 194
Top