When I focus on another element in my app (landscape), the keyboard goes over my view that should be displayed, which I do not really want.
Code:
<activity
android:name=".activity.ReportsEditActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_reports_edit"
android:parentActivityName=".activity.MainActivity"
android:windowSoftInputMode="adjustPan|stateVisible">
</activity>
The edittext:
<EditText
android:id="@+id/report_template_grid_multi_line_edit_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/grid_element_top_and_bottom_padding"
android:layout_marginEnd="@dimen/grid_padding"
android:layout_marginStart="@dimen/grid_padding"
android:layout_marginTop="@dimen/grid_element_top_and_bottom_padding"
android:gravity="top|start"
android:inputType="textMultiLine"
android:paddingBottom="@dimen/grid_element_top_and_bottom_padding"
android:paddingEnd="@dimen/grid_element_top_and_bottom_padding"
android:paddingStart="@dimen/grid_element_top_and_bottom_padding"
android:paddingTop="@dimen/grid_element_top_and_bottom_padding"
android:scrollbars="vertical"
android:textColor="@color/darkGray"
android:textSize="@dimen/grid_text_size_small" />
This is fine:
But this is not fine, this occurs after clikcing on the edittext above the previous one when the keyboard is open
You could try android:windowSoftInputMode="adjustResize"
<activity
android:name=".activity.ReportsEditActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="@string/title_activity_reports_edit"
android:parentActivityName=".activity.MainActivity"
android:windowSoftInputMode="adjustResize">
</activity>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.