In my app i have created a toolbar which sticks at the bottom of the screen now I want to move the toolbar above keyboard whenever the keyboard is show. I have tried the following ways but it didn't work
Tried this:
android:windowSoftInputMode="stateVisible|adjustResize"
and this
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
This is my layout file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="133dp"
android:gravity="center_vertical|top"
android:textColor="@color/white"
android:textSize="32sp"
android:id="@+id/evmainText"
android:inputType="textNoSuggestions"
android:background="@android:color/transparent"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
/>
<include layout="@layout/text_toolbar" />
</RelativeLayout>
and here's the toolbar file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textFormatToolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_alignParentBottom="true"
android:minHeight="?attr/actionBarSize"
android:background="@drawable/toolbar_back_text"
/>
I want to displsy toolbar like this