Layout is not adapting (XML)

Asked

Viewed 82 times

1

Hello I’m having difficulty in a layout I’m doing in Android Studio, on my phone it is perfect, but when I pass it to my friend with a phone with much lower resolution, Edittext Message just disappear for him.

Here on my cell phone Aqui Como Fica no Meu celular

Here from my friend

aqui Como fica no celular do meu amigo

<?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: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.example.xairo.ces.NovaOuvidoria">




<TextView
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:gravity="center"
   android:textStyle="bold"
   android:textAppearance="?android:attr/textAppearanceLarge"
   android:id="@+id/TxtSetor"
   android:textSize="30sp"
   android:textColor="@color/colorAccent"
   android:layout_alignParentTop="true"
   android:layout_alignParentLeft="true" />

<TextView
   android:id="@+id/textView"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="center_horizontal"
   android:layout_marginBottom="20dp"
   android:layout_marginTop="30dp"
   android:textColor="#2c3e50"
   android:textSize="25sp"
   android:textStyle="bold" />



<ImageButton
   android:id="@+id/BtnFoto"
   android:layout_width="80dp"
   android:layout_height="80dp"
   android:background="@drawable/camera"
   android:clickable="true"
   android:layout_above="@+id/BtnEnviarOuvidoria"
   android:layout_alignLeft="@+id/BtnEnviarOuvidoria" />
<ImageButton
   android:id="@+id/BtnDocumento"
   android:layout_width="80dp"
   android:layout_height="80dp"
   android:background="@drawable/documento_icon"
   android:clickable="true"
   android:layout_alignTop="@+id/BtnVideo"
   android:layout_alignRight="@+id/BtnEnviarOuvidoria" />

<ImageButton
   android:id="@+id/BtnVideo"
   android:layout_width="80dp"
   android:layout_height="80dp"
   android:background="@drawable/video"
   android:clickable="true"
   android:layout_below="@+id/TxtMensagem"
   android:layout_centerHorizontal="true" />

<Button

   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:layout_marginLeft="20dp"
   android:layout_marginRight="20dp"
   android:layout_marginTop="44dp"
   android:background="#033f88"
   android:text="Enviar"
   android:textColor="#ffffff"
   android:textSize="18sp"
   android:id="@+id/BtnEnviarOuvidoria"
   android:layout_alignParentBottom="true"
   android:layout_centerHorizontal="true" />

<EditText
   android:background="@drawable/edittext_borda"
   android:id="@+id/TxtMensagem"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:ellipsize="start"
   android:gravity="center"
   android:hint="Mensagem"
   android:layout_marginBottom="20dp"
   android:singleLine="false"
   android:inputType="textCapSentences|textMultiLine"
   android:maxLength="2000"
   android:maxLines="10"
   android:layout_above="@+id/BtnFoto"
   android:layout_below="@+id/lista" />

<Spinner
   android:background="@drawable/edittext_borda"
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:id="@+id/lista"
   android:textColor="@color/colorPrimary"
   android:layout_below="@+id/textView"
   android:layout_alignParentRight="true" />

  • 2

    Jairo, I think you need to take a look at Scrollview. In this case you will need to put one in this layout and set a minimum size for your EditText.

1 answer

0

Put a Scrollview in your layout. Ex:

blá blá blá...

< /LinearLayout>

  • 2

    It seems to me that your example has become incomplete.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.