0
When I put my App in landscape mode, it cuts off some of the information. So I need to put a ScrollView
. However, I’ve searched several websites and even the documentation but still can’t make it work. Can anyone help me?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".MainActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<RelativeLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/cabecalho"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#0097A7"
android:fontFamily="cursive"
android:gravity="center_horizontal"
android:text="Pousada George's Village"
android:textColor="#FFFFFF"
android:textSize="30sp"
android:textStyle="bold|italic"/>
<ImageView
android:id="@+id/georges"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/local"
android:layout_below="@id/cabecalho"
android:scaleType="centerCrop"
android:src="@drawable/georges"/>
<ImageView
android:id="@+id/local"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:padding="16dp"
android:src="@drawable/local"/>
<ImageView
android:id="@+id/fone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/local"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:src="@drawable/telefone"/>
<ImageView
android:id="@+id/site"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/fone"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:src="@drawable/site"/>
<ImageView
android:id="@+id/email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/site"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:src="@drawable/email"/>
<TextView
android:id="@+id/localizacao"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/georges"
android:layout_toRightOf="@id/local"
android:paddingTop="8dp"
android:text="Av. Ver. Manoel dos Santos, 195 - Centro, Bombinhas - SC, 88215-000."
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"/>
<TextView
android:id="@+id/texto_fone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/local"
android:layout_toRightOf="@id/fone"
android:text="(47) 3369-2177."
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"/>
<TextView
android:id="@+id/texto_site"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/fone"
android:layout_toRightOf="@id/site"
android:text="https://www.georgesvillage.com.br"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"/>
<TextView
android:id="@+id/texto_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/site"
android:layout_toRightOf="@id/email"
android:text="[email protected]"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"/>
<TextView
android:id="@+id/texto_hotel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/email"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp"
android:text="Este hotel informal com vista para o Oceano Atlântico está distribuído em vários prédios cercados por florestas tropicais, fica a 6 minutos a pé da Praia de Bombinhas e a 19 km da rodovia federal BR-101."
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#000000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/texto_hotel"
android:layout_alignParentRight="true"
android:padding="5dp"
android:text="By: R.A.O."
android:textSize="7sp"
android:textStyle="italic"/>
</RelativeLayout>
</ScrollView>
Welcome to the Rogério community. See if this answer helps: https://stackoverflow.com/a/18677515/8133067
– Pedro Gaspar