Android Question IME_HeightChanged (NewHeight As Int, OldHeight As Int) Not found

gregorio_adrian_gimenez

Active Member
Licensed User
HI Everyone

I have a large project, where I need to control the keyboard but for some reason I cannot determine the cause. Does not lift the IME_HeightChanged (NewHeight As Int, OldHeight As Int) function
In a test project it works fine, but when you agree with my big project it doesn't work.
I guess some of my code does not work, it is very strange.
Is there a simple way to identify the cause and then see how to solve it? If my manifest can be helpful?
If you don't have to rebuild the entire project to see what causes it to not work
Greetings to all

Regards
 

Geezer

Active Member
Licensed User
It's your large app in full screen mode ?

The height changed event is not triggered in full screen mode
 
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Hi! Ye was written in the manifesto, but it doesn't work. Could it be that it conflicts with something else? I add the complete manifest
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.
CreateResourceFromFile (Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile (Macro, FirebaseAnalytics.FirebaseAnalytics)
'CreateResourceFromFile (Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile (Macro, FirebaseFirestore.Firebase)

CreateResourceFromFile (Macro, FirebaseAuth.FirebaseAuth)
CreateResourceFromFile (Macro, FirebaseNotifications.FirebaseNotifications)


'************ Facebook Login ****************
AddApplicationText( <activity
            android:name="com.facebook.FacebookActivity"
            android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" />
          <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>)

'************ Facebook Login (end) **********
CreateResource(values, facebook.xml, <resources>
    <string name="facebook_app_id">XXXXXXXXXXXXXXXXXX</string>
   </resources>)

AddApplicationText(
<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
)

#additionaljar: com.android.support:support-v4

SetApplicationAttribute(android:theme, "@style/MyAppTheme")


CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#0098FF</item>
        <item name="colorPrimaryDark">#007CF5</item>
        <item name="colorAccent">#AAAA00</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="android:windowTranslucentNavigation">false</item>
         <item name="android:windowTranslucentStatus">true</item>
    </style>
</resources>
)
AddApplicationText(
 <service android:name="com.google.firebase.components.ComponentDiscoveryService" >
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
             <meta-data
                android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />
            <meta-data
                android:name="com.google.firebase.components:com.google.firebase.storage.StorageRegistrar"
                android:value="com.google.firebase.components.ComponentRegistrar" />

            <meta-data android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"
            android:value="com.google.firebase.components.ComponentRegistrar"/>

        </service>
)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)

SetActivityAttribute(Mensajes_privados, android:windowSoftInputMode, adjustResize|stateHidden)

'********* TabStrip ***********************
CreateResource(drawable, background_tab.xml,
<selector xmlns:android="http://schemas.android.com/apk/res/android"
   android:exitFadeDuration="@android:integer/config_shortAnimTime">
  <item android:state_pressed="true" android:drawable="@color/background_tab_pressed" />
  <item android:state_focused="true" android:drawable="@color/background_tab_pressed"/>
  <item android:drawable="@android:color/transparent"/>
</selector>)
CreateResource(values, colors.xml,
<resources>
  <color name="background_tab_pressed">#6633B5E5</color>
</resources>)
'******************************************
SetApplicationAttribute(android:largeHeap, "true") ' incrementa memoria para bajar imagenes
SetApplicationAttribute(android:allowBackup, "false") ' evita que guarde un backup de los archivos internos
 
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Tip: your manifest declaration will break firebase messaging service.

You have only set the attribute to one specific activity. What about the other activities?
wow, EREL, I have no idea, how do I do that? I do not understand :confused::confused::confused::oops::oops:,



Regarding IME HeightChanged
Take out the filter to the log, and I think these are the records when IME doesn't lift, can it be useful to see what can happen?


amt theme : UPSM or Dark type
bha Update SetupWizard State : complete
bha Update SetupWizard State : complete
amt theme : UPSM or Dark type
Not IME target window, ignoring
bgs force network blocking under CSC : UFN
bha Update SetupWizard State : complete
amt theme : UPSM or Dark type
Not IME target window, ignoring
bgs force network blocking under CSC : UFN
bha Update SetupWizard State : complete
amt theme : UPSM or Dark type
Not IME target window, ignoring
bha Update SetupWizard State : complete
amt theme : UPSM or Dark type
Not IME target window, ignoring
bha Update SetupWizard State : complete
amt theme : UPSM or Dark type
Not IME target window, ignoring
bgs force network blocking under CSC : UFN
bgs force network blocking under CSC : UFN
[IIManager] [PF_OP][updateToolbarPage] 10971923
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
cmr [PF_KL][SIIC] getSelectedText done 0
cmr [PF_KL][SIIC] getTextBeforeCursor[ 127 ] done 0
cmr [PF_KL][SIIC] getTextAfterCursor[ 127 ] done 0
TymeCore mPdL: BuildTime = 0.0071s
[IIManager] [PF_KL] IIfo BuildTime - tookTime : 8
Display 0 HWC layers:
type | handle | flag | format | source crop (l,t,r,b) | frame | name
------------+--------------+------+-----------+----------------------------+---------------------+------
Device | 0xf5083540 | 0002 | RGBA_8888 | 0.0 0.0 720.0 1520.0 | 0 0 720 1520 | com.Apptravel1.myapp/com.Apptravel1.myapp.mensajes_privados[2857]#0
Device | 0xf54f93e0 | 0000 | RGBA_8888 | 0.0 0.0 720.0 937.0 | 0 583 720 1520 | InputMethod[5917]#0
Device | 0xf54f8ce0 | 0000 | RGBA_8888 | 0.0 0.0 720.0 54.0 | 0 0 720 54 | StatusBar[4308]#0
Device | 0xf5083620 | 0000 | RGBA_8888 | 0.0 0.0 720.0 84.0 | 0 1436 720 1520 | NavigationBar[4308]#0
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
reset, Reparenting to original parent, shouldDeferScheduleAnimation=false, destroyLeash=true, surface=Surface(name=97301a6 InputMethod)/@0x1eeab83, parent=Surface(name=WindowToken{9c8e80a android.os.Binder@f66075})/@0x5332100, parentNativeHandle=android.os.BinderProxy@797f518, caller=com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:97 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:104 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:74
reparent is called, sc=Surface(name=97301a6 InputMethod)/@0x1eeab83, newParentHandle=android.os.BinderProxy@797f518, transaction=android.view.SurfaceControl$Transaction@d667cdf
destroy(transaction), animation-leash is destroyed, sc=Surface(name=Surface(name=97301a6 InputMethod)/@0x1eeab83 - animation-leash)/@0x11d4aa0, transaction=android.view.SurfaceControl$Transaction@d667cdf, caller=com.android.server.wm.SurfaceAnimator.reset:338 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0:97 com.android.server.wm.-$$Lambda$SurfaceAnimator$SIBia0mND666K8lMCPsoid8pUTI.run:4 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$1:104 com.android.server.wm.-$$Lambda$SurfaceAnimator$vdRZk66hQVbQCvVXEaQCT1kVmFc.onAnimationFinished:4 com.android.server.wm.LocalAnimationAdapter.lambda$startAnimation$0:74 com.android.server.wm.-$$Lambda$LocalAnimationAdapter$X--EomqUvw4qy89IeeTFTH7aCMo.run:4
[97301a6 InputMethod#0]::reparent oldParent:[Surface(name=97301a6 InputMethod)/@0x1eeab83 - animation-leash#0], newParent:[WindowToken{9c8e80a android.os.Binder@f66075}#0]
id=52489 Removed Surface(name=97301a6 InputMethod)/@0x1eeab83 - animation-leash#0 (1/57)
id=52489 onRemoved Surface(name=97301a6 InputMethod)/@0x1eeab83 - animation-leash#0
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1144000 uid : 1000 pid : 4002 tag : com.sec.android.inputmethod@1569
filterNetworkStateForUid() uid: 10167, pid: 2708
filterNetworkStateForUid() uid: 10167, pid: 2708, networkInfo: [type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false]
Sending ACTION_BATTERY_CHANGED. scale:100, info:{.chargerAcOnline = false, .chargerUsbOnline = true, .chargerWirelessOnline = false, .maxChargingCurrent = 0, .maxChargingVoltage = 0, .batteryStatus = CHARGING, .batteryHealth = GOOD, .batteryPresent = true, .batteryLevel = 50, .batteryVoltage = 3893, .batteryTemperature = 303, .batteryCurrent = 0, .batteryCycleCount = 0, .batteryFullCharge = 3300000, .batteryChargeCounter = 1518000, .batteryTechnology = Li-ion}
online:4, current avg:281, charge type:1, POGO powered:false, power sharing:false, high voltage charger:false, charger_type:0, capacity:280000, batterySWSelfDischarging:false, misc_event:0, current_event:0, current_now:270
Plugged
 
Upvote 0

gregorio_adrian_gimenez

Active Member
Licensed User
Thanks Erel, I don't use IME in the other activities. Only in one and it does not work for me in my project, check each activity one by one to see that it has no use of the IME function. Something is and I fail to realize.
 
Upvote 0
Top