Android Question Errors with library XtraViews on LenovoPad YOGA Tablet2-1050F

welu1805

Active Member
Licensed User
Longtime User
Hi all,

I use the library XtraViews for my dialogs and msgboxes. In most cases it works good, but with one tablet from my son-in-law there are always errors. The tablet is: LenovoPad YOGA Tablet2-1050F, Android 5.0.1

These errors are with ALL XtraView dialogs and msgboxes. Therefore I wrote a simple test app. On all my tablets and phones it works good but on that Lenovo tablet are always the same errors.

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 btnTest As Button
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")

    btnTest.Initialize("btnTest")
    btnTest.Text = "XtraView MsgBox"
    Activity.AddView(btnTest, 100dip, 100dip, 200dip, 100dip)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub btnTest_Click
    Dim Dialog As DialogView
    Dialog.MsgBox("The title", "The message ...", "Positive", "Negative", "Cancel", Null)
End Sub

When I press btnTest this error immediately occurs in the log:

Error occurred on line: 46 (Main)
java.lang.RuntimeException: InputChannel is not initialized.
at android.view.InputEventReceiver.nativeInit(Native Method)
at android.view.InputEventReceiver.<init>(InputEventReceiver.java:70)
at android.view.ViewRootImpl$WindowInputEventReceiver.<init>(ViewRootImpl.java:5815)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:612)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:272)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.Dialog.show(Dialog.java:298)
at com.datasteam.b4a.xtraviews.DialogView.show(DialogView.java:353)
at com.datasteam.b4a.xtraviews.DialogView.MsgBox(DialogView.java:385)
at b4a.example.main._btntest_click(main.java:414)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:4767)
at android.view.View$PerformClick.run(View.java:19784)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
** Activity (main) Pause, UserClosed = true **

This is line 46:
Dialog.MsgBox("The title", "The message ...", "Positive", "Negative", "Cancel", Null)

Has anyone an idea?

Dialogs with the library BetterDialogs work also on Lenovo! But in my app there are many dialogs with XtraViews and I don't like to change all to BetterDialogs. A lot of work ...

Thanks
Lutz
 
Top