0

Help needed I am getting very surprising issue,please help me to find solution. Here is my code

    <?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>

enter image description here

when keyboard is opened and closed, the height of scrollview not working and the area where keyboard opens remains as empty enter image description here

salih kallai
  • 877
  • 2
  • 11
  • 32
yubaraj poudel
  • 3,493
  • 1
  • 26
  • 26
  • 1
    possible duplicate http://stackoverflow.com/questions/9111813/how-to-move-the-layout-up-when-the-soft-keyboard-is-shown-android – Arshad Mar 12 '16 at 18:12
  • yea, finally found the sollution , in oncreate() getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); – yubaraj poudel Mar 12 '16 at 18:26

0 Answers0