大家早上好,当显示键盘时,我对调整布局大小有一点问题。
在清单中,我具有adjustResize,并且我尝试使用adjustPan,但是在滚动recyclerview时遇到问题。
我的布局代码是:
<LinearLayout
android:id="@+id/layoutGeneralHome"
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"
android:orientation="vertical"
tools:context=".fragments.fragment_home">
<LinearLayout
android:id="@+id/layoutRecycler"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.9">
<android.support.v7.widget.RecyclerView
android:id="@+id/listChatGeneral"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.10"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.75"
android:orientation="vertical">
<EditText
android:id="@+id/edtMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Scrivi messaggio"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.25">
<Button
android:id="@+id/btnSend"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="INVIA"
android:textSize="18sp"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
感谢谁能帮助我
使用父级布局的nestedscrollview