I have an issue with a simple layout. If I set
android:windowSoftInputMode="stateHidden|adjustResize"
this happens: Bug
In any case this happens only If I open keyboard from landscape, then rotate (with keyboard open). In normal use (rotating and then opening keyboard) this does not happens!
If I set
android:windowSoftInputMode="stateHidden|adjustPan"
ActionBar is pushed up.
Here layout code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/a"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_below="@+id/ad_view_chat"
android:layout_gravity="bottom"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/listChatLayout"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_above="@+id/switchbuttons"
android:layout_marginTop="2dp">
<ListView
android:id="@+id/listChat"
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:longClickable="true"
android:stackFromBottom="true"
android:transcriptMode="normal" />
</LinearLayout>
<RelativeLayout
android:id="@+id/switchbuttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_above="@+id/messaggiLayout"
android:layout_centerHorizontal="true">
<RadioButton
android:id="@+id/cmd"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="15dp"
android:checked="false"
android:gravity="center"
android:text="Cmd"
android:layout_marginLeft="5dp" />
<RadioButton
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_toRightOf="@+id/cmd"
android:checked="true"
android:gravity="center"
android:text="Message" />
<com.rey.material.widget.Button
android:id="@+id/button_arrow_down"
android:background = "@drawable/arrow_down"
style="@style/FlatColorButtonRippleStyle"
android:layout_width="40dp"
android:layout_height="40dp"
android:text=""
android:textAppearance="@style/Base.TextAppearance.AppCompat.Button"
android:textColor="#FF2196F3"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button_arrow_up"
android:layout_toEndOf="@+id/button_arrow_up"
android:layout_marginLeft="3dp" />
<com.rey.material.widget.Button
android:id="@+id/button_arrow_up"
style="@style/FlatColorButtonRippleStyle"
android:layout_width="40dp"
android:layout_height="40dp"
android:background = "@drawable/arrow_up"
android:text=""
android:textAppearance="@style/Base.TextAppearance.AppCompat.Button"
android:textColor="#FF2196F3"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/message"
android:layout_toEndOf="@+id/message"
android:layout_marginLeft="20dp" />
</RelativeLayout>
<RelativeLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/listChatLayout"
android:layout_alignParentBottom="true"
android:id="@+id/messaggiLayout">
<EditText
android:id="@+id/messaggi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:imeOptions="actionSend|flagNoFullscreen"
android:inputType="textImeMultiLine"
android:layout_toLeftOf="@+id/button_send"
android:maxLength="100">
<requestFocus />
</EditText>
<com.rey.material.widget.Button
android:id="@+id/button_send"
style="@style/FlatColorButtonRippleStyle"
android:layout_width="50dp"
android:layout_alignParentRight="true"
android:background = "@drawable/send2"
android:layout_height="50dp"
android:text=""
android:textAppearance="@style/Base.TextAppearance.AppCompat.Button"
android:textColor="#FF2196F3" />
</RelativeLayout>
</RelativeLayout>
<com.google.android.gms.ads.AdView
android:id="@+id/ad_view_chat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="@string/banner_chat_ad_unit_id" />
</RelativeLayout>
FIX: The problem was in mikepenz MaterialDrawer. Now I contacted mike and we fixed the bug