Android 键盘打开时的滚动视图高度不自动
需要帮助 我得到了非常令人惊讶的问题,请帮助我找到解决办法。 这是我的密码Android 键盘打开时的滚动视图高度不自动,android,Android,需要帮助 我得到了非常令人惊讶的问题,请帮助我找到解决办法。 这是我的密码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:orientation="vertical">
<LinearLayout
android:id="@+id/ll_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:minHeight="48dp"
android:orientation="vertical"
android:paddingLeft="@dimen/padding_normal"
android:paddingRight="@dimen/padding_normal">
<android.support.v7.widget.SearchView
android:id="@+id/search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/primaryText"
android:textSize="14sp"
app:iconifiedByDefault="false"
app:queryHint="@string/search_hint" />
</LinearLayout>
<include layout="@layout/healthtips" />
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_home"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/padding_normal"
android:layout_marginRight="@dimen/padding_normal"
android:layout_weight="1" />
<TextView
android:id="@+id/tv_askexpert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:background="@android:color/white"
android:gravity="center"
android:minHeight="48dp"
android:text="@string/ask_expert"
android:textColor="@color/primaryText"
android:textSize="16sp" />
</LinearLayout>
打开和关闭键盘时,scrollview的高度不工作,键盘打开的区域保持为空
可能重复yea,最终在oncreate()getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT\u INPUT\u ADJUST\u PAN)中找到解决方案;