键盘在使用adjustPan时隐藏操作栏

Lar*_*ara 5 android android-ui android-layout

我有一个"混合"的聊天,editText和发送按钮是java/native,我的聊天系统在服务器中,我将它加载到webview中.

当用户开始输入时,我想用键盘调整我的webview.我使用了adjustPan并且工作正常,但现在我的操作栏在键盘打开时隐藏了.

这是我的Activity的Android清单的一部分:

    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:windowSoftInputMode="adjustPan">
    </activity>
Run Code Online (Sandbox Code Playgroud)

这是我的chat.xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
    android:id="@+id/webview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_alignParentTop="true"
    android:layout_above="@+id/llFooter">
</WebView>

<LinearLayout
    android:id="@id/llFooter"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="horizontal">

    <EditText
        android:id="@+id/chat_message"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="0.9"
        android:maxLines="3"
        android:hint="Schreibe deine Nachricht hier..">
    </EditText>

    <Button
        android:id="@+id/chat_button"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="0.1"
        android:text=">">
    </Button>
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

注意:我的聊天是片段

任何人都知道如何解决它?

我已经检查了这些链接但未成功:

键盘出现时ActionBar隐藏

使用adjustPan时软键盘隐藏ActionBar

编辑1:增加了屏幕截图

AdjustPan:隐藏了操作栏,但聊天webview适合键盘AdjustResize:操作栏未隐藏,但聊天webview不合适.应该向下滚动直到最后的消息

使用AdjustPan

使用AdjustResize