Android Question Tabhost with LGDX Issue/Bug?!

komfa

New Member
Licensed User
Longtime User
Hey Guys,
I have a mysterious Bug. I try to get LGDX working in a TabHost, this works very well, but when i change the tab, to a panel with a EditText-Box and he focus it, he inserted multiple times a "§" to the EditText, depends on the device-speed. (Galaxy S6 i've got "§§§")

Code and Project is attached, Tested with LGDX v1.11 & v1.12.

Would be great if anybody has an idea =)
greetings

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Dim cameraSaveVector As lgMathVector3
    Dim cameraSaveZoom As Float = 1
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.   
    'GDXObjects
    Dim surface As View
   
    Dim lGdx As LibGDX
    Dim GL As lgGL
    Dim Camera As lgOrthographicCamera
   
       
'    Dim IP As lgInputProcessor
'    Dim GD As lgGestureDetector

    Dim EditText1 As EditText
    Dim tabHost1 As TabHost
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    tabHost1.Initialize("Tabhost1")
    Activity.AddView(tabHost1, 0, 0, 100%x, 100%y)
       
    tabHost1.AddTab("ET", "tabPanel1.bal")
    surface = lGdx.InitializeView("LG")
    tabHost1.AddTab2("LGDX", surface)
   
    tabHost1.CurrentTab = 1
End Sub

Sub Activity_Resume
    'Informs libGDX of Resume events
        If lGdx.IsInitialized Then lGdx.Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    'Informs libGDX of Pause events
        If lGdx.IsInitialized Then lGdx.Pause
End Sub

Sub LG_Create
'    GD.Initialize("GD")
End Sub

Sub LG_Resize(width As Int, height As Int) 'width=1440 height=2560 => screen size
    Camera.Initialize
    Camera.SetToOrtho2(False, width, height) 'set camera viewport to viewport size vpW by vpH
    Camera.Zoom = 1
End Sub

Sub LG_Render
    'Hauptmenü
    GL.glClearcolor(1,0,0,1) 'RGB,alpha - Clear screen with color based on values 0 to 1 for red, green, blue and alpha
    GL.glClear(GL.GL10_COLOR_BUFFER_BIT)   
    GL.glEnable(GL.GL10_BLEND)
    GL.glBlendFunc(GL.GL10_SRC_ALPHA ,GL.GL10_ONE_MINUS_SRC_ALPHA)
    Camera.Update
End Sub

Sub LG_Resume
    If cameraSaveVector.x <> 0 Or cameraSaveVector.y <> 0 Then
        Camera.Position.set(cameraSaveVector.x, cameraSaveVector.y, cameraSaveVector.z)
    End If
    Camera.Zoom = cameraSaveZoom
    Camera.Update
End Sub

Sub LG_Pause
    cameraSaveVector = Camera.Position
    cameraSaveZoom = Camera.Zoom
End Sub

Sub LG_Dispose

End Sub
 

Attachments

  • lgdx.zip
    8.1 KB · Views: 160
Top