AdjustPan AdjustResize不适用于其他窗口

时间:2020-08-25 14:35:59

标签: android android-studio android-layout

我的BaseActivity具有这些标记,因为我具有包含底部导航的主页布局,而我只是在片段上添加了更多片段

window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)

    window.setFlags(
        WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
        WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
    )

enter image description here

这是我的首页片段代码。

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <FrameLayout
        android:id="@+id/home_container"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toTopOf="@+id/bottomBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

    </FrameLayout>
    <UI.CustomViews.BottomBar
        android:id="@+id/bottomBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

    </UI.CustomViews.BottomBar>

</androidx.constraintlayout.widget.ConstraintLayout>

当我添加AdjustPan或AdjustResize并且软键盘在Fragment中的Edittext上重叠时

当我删除这些标志时,它会调整大小,但问题是它会更改页眉和页脚的高度

注意:在仿真器上,它正在运行idk,为什么我过去几天一直陷于困境 基本上我想实现诸如whatsapp之类的Edittext并通过软键盘发送按钮

0 个答案:

没有答案