0

Action Bar is going out of the screen when keyboard is in use on Edit text.

I have tried using some parameters of windowSoftInputMode on activity tag in Manifest as adjustresize, adjustPan but none of the above worked.

this is the starting of app

after the edit text gets focus and keyboard is in use

My xml is

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:background="#ffffff"
    android:fitsSystemWindows="true"
    android:orientation="vertical"
    tools:context=".MainActivity">
    <include
        layout="@layout/toolbar"
        android:layout_width="match_parent"

        android:layout_height="?attr/actionBarSize"

        android:layout_gravity="top"
        />
    <ScrollView
        android:layout_width="match_parent"

        android:layout_height="0dp"
        android:layout_weight=".9"
        android:id="@+id/scrollView"
        android:paddingBottom="@dimen/margin_toolbar"
        android:paddingLeft="@dimen/margin_toolbar"
        android:paddingRight="@dimen/margin_toolbar"
        android:paddingTop="@dimen/margin_toolbar">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">
        <RelativeLayout                     xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/layout2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:id="@+id/layout1">
            </LinearLayout>
        </RelativeLayout>

        </LinearLayout>
    </ScrollView>

    <include
        layout="@layout/bottom_chat"
        android:layout_width="match_parent"

        android:layout_height="0dp"
        android:layout_weight=".1"
        android:layout_gravity="bottom"
        />
</LinearLayout>

I am not able to resolve the problem

Viral Patel
  • 1,296
  • 1
  • 11
  • 24
Taha alam
  • 372
  • 3
  • 11

0 Answers0