2016-11-25 2 views
0

Ich habe Probleme mit dem Hintergrund beim Schreiben in EditText auf meinem Handy. Mein Hintergrund ändert die Größe und hält nicht die richtigen Proportionen. Ich möchte, dass es hinter der Tastatur versteckt ist. Das ist mein voller Code:Android, Hintergrund behält keine Proportionen beim Schreiben in TextEditor

<?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:background="@drawable/tlo4"> 

    <ScrollView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent"> 

     <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:tools="http://schemas.android.com/tools" 
      android:id="@+id/activity_add_advice" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:paddingBottom="@dimen/activity_vertical_margin" 
      android:paddingLeft="@dimen/activity_horizontal_margin" 
      android:paddingRight="@dimen/activity_horizontal_margin" 
      android:paddingTop="@dimen/activity_vertical_margin" 
      tools:context="com.jagoda.myapplication.AddAdvice"> 

      <TextView 
       android:id="@+id/tytul_add" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       style = "@style/tekst" 
       android:text=""/> 

      <TextView 
       android:id="@+id/tytul2_add" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:layout_below="@id/tytul_add" 
       style = "@style/tytulDuzy" 
       android:text=""/> 

      <EditText 
       android:id="@+id/new_ad" 
       android:layout_width="match_parent" 
       android:layout_height="300dp" 
       android:layout_marginTop="20dp" 
       android:layout_below="@id/tytul2_add" 
       style="@style/tekst2" /> 

      <Button 
       style="@style/przycisk" 
       android:text="Dodaj rozwiązanie" 
       android:layout_width="340dp" 
       android:layout_height="wrap_content" 
       android:layout_marginTop="10dp" 
       android:layout_centerHorizontal="true" 
       android:layout_below="@id/new_ad" 
       android:onClick="to_home" 
       android:id="@+id/button"/> 

     </RelativeLayout> 
    </ScrollView> 
</LinearLayout> 

Sie für Ihre Hilfe :)

Before writing in EditText

While writing in EditText

+0

Könntest du ein paar Bilder hochladen, bevor und nachdem du 'EditText' geschrieben hast? – JuLes

+0

OK, ich habe es oben hinzugefügt. – yogourt

+0

in 'AndroidManifest' versuchen Sie, den Körper Ihrer Aktivität hinzuzufügen:' android: windowSoftInputMode = "adjustPan" ' – JuLes

Antwort

0

in AndroidManifest try Vielen diese auf Ihre Aktivität des Körpers hinzuzufügen: android:windowSoftInputMode="adjustPan"

Verwandte Themen