Das gesamte Layout wird nach oben gedrückt, wenn die Tastatur aufspringt. Xml-Datei enthält Listenansicht und darunter zwei Tasten, wenn Tastatur Popups sowohl Listenansicht und Schaltflächen nach oben drückt.Layout wird nach oben gedrückt, wenn Tastatur Popups
<?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"
android:orientation="vertical"
tools:context="com.example.athis.buy.HomeScreen">
<SearchView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ListView
android:id="@+id/list_item"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_weight="8"
android:divider="#ffffff"
android:dividerHeight="10dp"
android:padding="5dp" />
<LinearLayout
android:id="@+id/buttons"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#a8b3ff"
android:gravity="bottom"
android:orientation="horizontal"
android:weightSum="100">
<Button
android:id="@+id/filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="5dp"
android:layout_marginStart="10dp"
android:layout_weight="50"
android:text="Filter"
android:layout_marginBottom="2dp"/>
<Button
android:id="@+id/sort"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="10dp"
android:layout_marginStart="5dp"
android:layout_weight="50"
android:text="Sort"
android:layout_marginBottom="2dp"/>
</LinearLayout>
</LinearLayout>
Ich habe android hinzugefügt: windowSoftInputMode = "stateHidden" in manifestieren, so dass, wenn ich EditText berühren nur dann Tastatur
So einfache Lösung, Dank. –