My Problem is that when i click on an Edit Text and the Keyboard appears that the Keyboard is over my Edit Text and the Button and only if i press any button on the keyboard the View updates and the Edit Text and the Button are over the Keyboard. And when i press Back the Keyboard close but the View dont update und i have where the Keyboard was a blank space. The Layout called from class is:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start"> <include layout="@layout/app_bar_chat" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> </android.support.v4.widget.DrawerLayout> The app_bar_chat xml:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start"> <include layout="@layout/app_bar_chat" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_main" app:menu="@menu/activity_main_drawer" /> </android.support.v4.widget.DrawerLayout> And the content_chat layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/chatbackgroundcolor" app:layout_behavior="@string/appbar_scrolling_view_behavior" android:fitsSystemWindows="true" tools:context=".Chat_activity" tools:showIn="@layout/app_bar_chat" android:orientation="horizontal"> <Button android:layout_width="wrap_content" android:layout_height="50dp" android:text=" Send " android:id="@+id/btnsend" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true"/> <EditText android:layout_width="wrap_content" android:layout_height="50dp" android:id="@+id/texttosend" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_toLeftOf="@+id/btnsend" android:layout_toStartOf="@+id/btnsend"/> <ListView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/chatlistView" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_above="@+id/btnsend" android:transcriptMode="alwaysScroll" android:stackFromBottom="true"/> </RelativeLayout> Im using a Drawer Layout and when i delete the row
app:layout_behavior="@string/appbar_scrolling_view_behavior" in content_chat the view updates perfect but then the appbar is missing.
No comments:
Post a Comment