Bug? adjustResize|stateHidden -> half screen

yiankos1

Well-Known Member
Licensed User
Longtime User
Hello team,

I am not sure if it is a bug with new b4a beta version (because just updated) but when i added this line in manifest in order IME to work properly:
B4X:
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
I have this strange behavior in my smartphone (Pixel 7 Pro - Android 14): when i install a release version of my app, at the first run everything is fine, but at second start if i kill it from recent apps it starts at half screen like the keyboard is open but it is not. If i click at text box in order to show keyboard and if i click back in order to hide it, app does not restored at previous state.



My log after i killed it from recent apps and started again:
B4X:
** Activity (main) Create (first time) **
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
*** loginpage: B4XPage_Created [mainpage]
*** mainpage: B4XPage_Disappear [mainpage]
*** loginpage: B4XPage_Appear [mainpage]
*** loginpage: IME_HeightChanged [loginpage]

For some strange reason if I add adjustResize|stateHidden in manifest, as you see, IME_HeightChanged is called at app start, but i don't know from where.

My manifest:


This behavior does not encountered in emulator (API 35) neither to an older smartphone, just on my pixel.

I have made a research on internet, i saw couple of posts with this behavior but couldn't figure out what does it causing this. link , link
 
Last edited:

yiankos1

Well-Known Member
Licensed User
Longtime User
It is most probably not related to changes in B4A v13.0.

Does it happen with this example: https://www.b4x.com/android/forum/t...-keyboard-with-the-ime-library.14832/#content ?
Thank you for your answer.

I think it is not working properly. As you can see at recording, the "always visible button" is not always visible.

Recording

Here is log:
B4X:
** Activity (main) Create (first time) **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create (first time) **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Ignoring event: ime_heightchanged
Ignoring event: ime_heightchanged
Ignoring event: ime_heightchanged
 

yiankos1

Well-Known Member
Licensed User
Longtime User
This is a different issue. It happens because the activity is paused while the event fires. It will be solved if you switch to B4XPages.
This is the log event in IME demo project which is not in B4XPages. My initial's post project is built in B4XPages.
 

yiankos1

Well-Known Member
Licensed User
Longtime User

Logs:
B4X:
** Activity (main) Pause event (activity is not paused). **
*** mainpage: B4XPage_Disappear [mainpage]
** Activity (main) Create  **
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
*** mainpage: IME_HeightChanged [mainpage]

Here is the recording:
Recording

Bottom button disappears for some reason?!

As i see at logs, for some reason when i open the app after i delete from recent apps, IME_HeightChanged is called but i don't know why. Same behavior as my project.

If it is only on my smartphone, we can move one, but if it is not?

p.s. This behavior can only reproduced in my smartphone Pixel 7 Pro (v. 14)
 

yiankos1

Well-Known Member
Licensed User
Longtime User
The video file is empty.

And post the full logs.
Here is the link
and the log:
B4X:
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
*** mainpage: IME_HeightChanged [mainpage]
*** mainpage: IME_HeightChanged [mainpage]
** Activity (main) Pause event (activity is not paused). **
*** mainpage: B4XPage_Disappear [mainpage]
** Activity (main) Create  **
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
*** mainpage: IME_HeightChanged [mainpage]

*** mainpage: IME_HeightChanged [mainpage] ---> i don't click on a textbox in order to show soft keyboard but method is called when i open app after i delete it from recent apps. This happens only if adjustResize|stateHidden is in manifest and in Pixel
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…