How do I prevent the keyboard from playing with my layout?

0

How do I prevent the button from changing site when editText pulls the keyboard? Thanks in advance.

xmlfromBhutan:

<Buttonandroid:id="@+id/hora_picker"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:text="ESCOLHER HORA"
    android:textStyle="bold"
    android:textSize="25sp"
    android:layout_alignBaseline="@+id/Hora"
    android:layout_alignBottom="@+id/Hora"
    android:layout_toEndOf="@+id/sala" />
    
asked by anonymous 07.07.2017 / 17:09

1 answer

1

Declare this line in your Activity within AndroidManifest:

<activity android:name="MyActivity"
    ...
    android:windowSoftInputMode="adjustPan"
    ...
</activity>

As explained by the Android Developer website:

  

adjustPan : The main activity window is not resized to create space   to the on-screen software keyboard. Instead, you move the   content of the window so that the current focus is never   superimposed over the keyboard and users can always see what they type.   Usually, this behavior is less desirable than   resizing, as the user may need to close the   software to access and interact with the overlapping parts of the window.

link

    
09.07.2017 / 19:05