RecyclerView hides Actionbar when SoftKeyboard is opened

独自空忆成欢 提交于 2019-12-04 04:56:38

Just add a empty scrollview, solved: RecyclerView hides Actionbar when SoftKeyboard is opened 解决办法

Like this:

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    tools:context="me.drakeet.seashell.ui.social.PostActivity">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    </ScrollView>

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <me.drakeet.seashell.widget.MultiSwipeRefreshLayout
            android:layout_weight="1"
            android:layout_marginBottom="4dp"
            android:id="@+id/swipe_refresh_layout"
            style="@style/BbsBackground"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <android.support.v7.widget.RecyclerView
                android:id="@+id/rv_reply_list"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="48dp"/>

        </me.drakeet.seashell.widget.MultiSwipeRefreshLayout>

        <include
            android:layout_gravity="bottom"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/view_reply"/>
    </LinearLayout>

</FrameLayout>

i had the same issue and i solved it adding

android:windowSoftInputMode="adjustResize"

in the activity tag in the manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!