Unexpected screen rotation error in editor
I was entering the application to test the use of a Keyboard and mouse adapter on the device, so far so good. to use the keyboard I needed to leave the device's screen rotation horizontally for better experience, I selected one of my projects and opened it, after that I did some tests and everything was ok, as the interface was made to be used by the cell phone, it ends up making it a little difficult to adapt to the keyboard, but that doesn't come to the fact, so I went to the terminal (through the editor) then I went back to the editor, and when I went back this error was displayed.
Here below is the error occurred:
Manufacturer: Xiaomi
Device: M2102J20SG
App version: 2.1.2-beta (212)
Stacktrace:
java.lang.NullPointerException: Attempt to read from field 'android.widget.HorizontalScrollView com.itsaky.androidide.databinding.LayoutEditorFileTreeBinding.filetreeHorizontalScrollView' on a null object reference
at com.itsaky.androidide.fragments.FileTreeFragment.lambda$listProjectFiles$1$com-itsaky-androidide-fragments-FileTreeFragment(FileTreeFragment.java:240)
at com.itsaky.androidide.fragments.FileTreeFragment$$ExternalSyntheticLambda0.complete(Unknown Source:4)
at com.itsaky.androidide.tasks.TaskExecutor.lambda$executeAsync$1(TaskExecutor.java:48)
at com.itsaky.androidide.tasks.TaskExecutor$$ExternalSyntheticLambda0.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8250)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Steps for the error to happen:
- Open a project and go to the editor
- Open any other screen (Activity), I as an example opened the terminal.
- After that go back to the editor
- error appears. (with the screen rotated horizontally)
Device Name: PocoX3PRO Model: M2102J20SG System: Android 12