Android Question use windowTranslucentStatus but keyborad not call

Ju Yang

Active Member
Licensed User
Longtime User
Can you help me ,when use windowTranslucentStatus but my IME object IME_HeightChanged not run,
httpswww.b4x.comandroidforumthreadstranslucent-status-bar-navigation-keys.42614#content
this is my.xml file
B4X:
<?xml version="1.0" encoding="UTF-8"?>

-<resources>


-<style parent="@android:style/Theme.Holo.Light" name="MyTheme">

<item name="android:windowTranslucentNavigation">false</item>

<item name="android:windowTranslucentStatus">true</item>

<item name="android:fitsSystemWindows">true</item>

</style>

<style parent="@android:style/Theme.Holo.Light.NoActionBar" name="MyThemeNoTitle"> </style>

<style parent="@android:style/Theme.Holo.Light.Panel" name="MyThemeTransparent"> </style>

</resources>
this is my code
B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
Dim IME As IME
    Private Panel1 As Panel
    Private EditText3 As EditText
    Private EditText2 As EditText
    Private EditText1 As EditText
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Layout1")
    Activity.Color=Colors.Blue
    IME.Initialize("IME")
    IME.AddHeightChangedEvent
End Sub

Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
     Panel1.Top=NewHeight-Panel1.Height
    Log("check")
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub
if use SetActivityAttribute(main, android:theme, @style/MyTheme) IME can not run
upload_2016-5-3_12-29-20.png

if block then run ok ,but not windowTranslucentStatus
upload_2016-5-3_12-31-26.png

use my.xml windowTranslucentStatus style ,edittext has Occlusion
upload_2016-5-3_12-35-27.png

if block then run ok ,but not windowTranslucentStatus
upload_2016-5-3_12-39-40.png


thanks
 

Attachments

  • TranslucentStatus.zip
    31.2 KB · Views: 338

alimanam3386

Active Member
Licensed User
Longtime User
I have same issue with the lib IME AND when I use bellow code

B4X:
<item name="android:windowTranslucentStatus">true</item>

I also use this line of code but still have the problem :
B4X:
SetActivityAttribute(ChatAct, android:windowSoftInputMode, adjustResize|stateHidden)


any idea to fix it ?
 
Upvote 0
Top