I have created a default & landscape layout for my app, both of which contain an EditText. The EditText is exactly the same in both xml files. In the Activity attribute of my MainActivity class I include WindowSoftInputMode = SoftInput.AdjustPan, and I do not attempt to change this anywhere in my code. In portrait, everything works fine & as expected (the screen is shifted upwards to show the keyboard), but in landscape, the entire screen is hidden (both the EditText & other View(s)). The keyboard gets displayed, and allows the user to type, although they might barely know why they are typing, since even though they can see the text, they cannot see any other View(s) that describe the purpose of the EditText. I have tested this on the following:
Surface Duo
Samsung Galaxy S10e
Emulator in Visual Studio 2022
The problem does not occur with Surface Duo (even when I use single screen to have the keyboard displayed on the same screen), but it does occur on the S10e & emulator. Here are screenshots from the emulator in both portrait & landscape (the S10e looks almost the same):
Here is the xml for the EditText (this code is exactly the same for default & landscape):
<EditText android:id="@+id/txtCustomWin" android:layout_width="0dp" android:layout_height="wrap_content"
android:layout_weight="1" style="@style/BasicEditTextStyle" android:textColorHighlight="@color/RoyalBlue"
android:layout_gravity="center" android:gravity="right" android:paddingRight="4dp" android:textAlignment="gravity"
android:includeFontPadding="false" android:textSize="30dp" android:textStyle="bold" android:selectAllOnFocus="true"
android:inputType="number" android:numeric="integer" android:ellipsize="none" android:imeOptions="actionDone" tools:text="100000"/>