Android Question IME and NavDrawer problem

uniplan

Active Member
Licensed User
Longtime User
HI,
i reopen this ticket becouse i have another problem:

https://www.b4x.com/android/forum/threads/ime-library-error.75332/

i move my panel on top when IME_HeightChanged event is raised.

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")
   
   If FirstTime = True Then
     ridim=True
   End If
   
   Activity.LoadLayout("frmTicket")'Activity.LoadLayout("frmHome")
   ProgressDialogShow("Caricamento...")
   InitializeNavDrawerAndIME
   'NavDrawer.Initialize2("NavDrawer", Activity, NavDrawer.DefaultDrawerWidth, NavDrawer.GRAVITY_START)

   creazione_action_bar_e_menu
   
   rsz.scalaOrizzIni = 480 'valore iniziale settato in base alla risoluzine del designer
   rsz.scalaVertIni = 800 'valore iniziale settato in base alla risoluzine del designer
   
   ToolBar.InitMenuListener

   ridimensiona

   IME.AddHandleActionEvent(ACEditTextMessaggio)
End Sub


Sub InitializeNavDrawerAndIME

   IME.Initialize("IME")
   IME.AddHeightChangedEvent
   IME_HeightChanged(100%y, 0) 'manually call this method to set the layout of EditText1 and btnHideKeyboard
   'IME.AddHandleActionEvent(ACEditTextMessaggio)
   
   Dim e As Panel = Activity.Parent
   e.RemoveAllViews
   Dim p As Panel = e.Parent
   p.RemoveAllViews
   p.AddView(Activity, 0, 0, 100%x, 100%y)
   
   NavDrawer.Initialize2("NavDrawer", Activity, NavDrawer.DefaultDrawerWidth, NavDrawer.GRAVITY_START)
   p = Activity.Parent
   Dim p2 As Panel = p.Parent
   p.RemoveView
   p2.AddView(e, 0, 0, 100%x, 100%y)
   e.AddView(p, 0, 0, 100%x, 100%y)

End Sub

Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
   If PanelNuovoTicket.IsInitialized=True Then
     PanelNuovoTicket.Top = NewHeight - PanelNuovoTicket.Height
   End If
End Sub

All ok when i insert a text into my editText...but when i try to click on menu of NavDrawer, this don't work and i haven't nothing into log.
 

uniplan

Active Member
Licensed User
Longtime User
I created a little example where my navdrawer menu item not work.
The event of IME is on the last editText.
Thank you for your support @Erel
 

Attachments

  • navDrawer and IME problem.zip
    94.2 KB · Views: 226
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
In the layout1 you can see the edittext.
 

Attachments

  • 20170405_171634.jpg
    20170405_171634.jpg
    242.8 KB · Views: 249
Upvote 0
Top