Witam ! Uczę się od jakiegoś czasu pisania na Androida i natrafiłem na problem. Zazwyczaj layout sam się dostosowywał, przy wysuwaniu klawiatury, w taki sposób aby pole EditText było widoczne przy wpisywaniu tekstu. W tej aktywności jednak tak się nie dzieje.

Na stacku proponują wpisanie w pliku Manifest linijki do danej aktywności:

<activity android:windowSoftInputMode="adjustPan|adjustResize"> </activity>

 

I nie działa.

Czy macie jakieś pomysły ?

Layout aktywności:


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_conversation"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    tools:context="com.example.szymon.abuir.game">

    <TextView
        android:id="@+id/txtInfo"
        android:text="Prześlij słówko drugiemu graczowi i uruchom mu zegar. Jeśli udzieli poprawnej odpowiedzi, wciśnij +1"
        android:gravity="center"
        android:textSize="15sp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <ProgressBar
        android:id="@+id/barProgressTime"
        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:max="14"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/txtInfo"/>


    <RelativeLayout
        android:id="@+id/conversationRelative"
        android:layout_below="@+id/barProgressTime"
        android:background="@drawable/zaokraglone_rogi"
        android:elevation="4dp"
        android:paddingTop="20dp"
        android:layout_width="match_parent"
        android:layout_height="300dp">

        <LinearLayout
            android:orientation="vertical"
            android:id="@+id/conversationlayout"
            android:paddingTop="1dp"
            android:layout_width="match_parent"
            android:layout_height="match_parent">



            <ScrollView
                android:layout_width="match_parent"
                android:id="@+id/scrollView"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="match_parent"
                    android:padding="15dp"
                    android:layout_height="match_parent"
                    android:textAppearance="?android:attr/textAppearanceLarge"
                    android:id="@+id/text_message" />
            </ScrollView>


        </LinearLayout>


    </RelativeLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_alignParentBottom="true"
        android:layout_height="95dp">


        <EditText
            android:id="@+id/input_message"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_alignParentBottom="true"
            android:layout_centerHorizontal="true"
            android:layout_centerVertical="true"/>

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Start"
            android:id="@+id/button_clock"
            android:layout_alignParentStart="true"
            android:layout_above="@+id/input_message" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="+1"
            android:id="@+id/button_score"
            android:layout_above="@+id/input_message"
            android:layout_centerHorizontal="true" />

        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Wyślij"
            android:id="@+id/button_send"
            android:layout_above="@+id/input_message"
            android:layout_alignParentEnd="true" />


    </RelativeLayout>

</RelativeLayout>
 

Dla zobrazowania dodałem screenshoty, jak to wygląda.