0

The following file is intended to allow full vertical scrolling in Android devices. However when opening the app in Android Studio the light blue rectangular box ends just before where the buttons begin. Does not scroll. Members of Stack Overflow have helped me to overcome the file not opening. I thank them. But issue of scrolling remains.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
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"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.cancunsteve.aboutcancunsteve.MainActivity"
tools:showIn="@layout/activity_main">


<RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >

    <RelativeLayout
    android:id="@+id/scrollView"
    android:layout_alignParentStart="true"
    android:layout_marginTop="56dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
   <ImageView android:id="@+id/imageView"
    android:layout_column="1"
    android:background="@mipmap/lpussy"
    android:contentDescription='android:ContentDescription="@string/desc"'
    tools:ignore="HardcodedText"
    android:layout_width="200dp"
    android:layout_height="230dp" />


    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="       We&apos;ve been ... "
    android:id="@+id/text1"
    android:layout_alignTop="@+id/imageView"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true"
    android:background="#ffffff"
    android:foreground="#05ffffff"
    android:foregroundTint="#03ffffff"
    android:textColor="#000000" />



   <EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/editText2"
    android:text="Cancun, Playa del Carmen, ..."
    android:layout_below="@+id/text1"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true" />

<EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/editText"
    android:text="Holbox, ..."
    android:layout_below="@+id/editText2"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

    <ImageButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/imageButton"
    android:layout_below="@+id/editText3"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:background="@mipmap/campa"
    tools:ignore="ContentDescription"
    android:layout_alignBottom="@+id/editText5" />

    <EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:inputType="textEmailAddress"
    android:ems="10"
    android:id="@+id/editText3"
    android:text="thewebmaster@cancunsteve.com"
    android:layout_below="@+id/editText"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_alignRight="@+id/editText"
    android:layout_alignEnd="@+id/editText" />

    <EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:inputType="phone"
    android:ems="10"
    android:id="@+id/editText4"
    android:text="       011 52 998 8873919"
    android:layout_below="@+id/editText3"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_marginLeft="42dp"
    android:layout_marginStart="32dp" />

    <EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/editText5"
    android:text="be sure ..."
    android:layout_below="@+id/editText4"
    android:layout_toRightOf="@+id/ScrollView"
    android:layout_toEndOf="@+id/ScrollView" />

    <TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="click buttons multiple times to change state"
    android:id="@+id/textView2"
    android:layout_below="@+id/imageButton" />




  </RelativeLayout>
  </ScrollView>
Steve Paul
  • 19
  • 3
  • It is hard to visualize what is going on here, eg.: where's the blue box and where's the button, so perhaps attaching a screenshot would make it clearer. – Andy Res Aug 15 '18 at 21:38
  • 1
    I think what you are looking for can be scratched from https://stackoverflow.com/questions/4259607/if-scrollview-only-supports-one-direct-child-how-am-i-supposed-to-make-a-whole (i.e. a scrollview can only have one child) – TWL Aug 15 '18 at 22:07
  • as I said already, the app does not scroll. I am using Android Studio to build the app with hand coding. In Studio as I said, a blue box appears. But it stops just above the buttons. Regarding the suggestion to scratch the question, how rude to say this to someone looking for assistance. by only one child, fine. how should the code be altered. I am looking for answers from good people. – Steve Paul Aug 16 '18 at 22:33

0 Answers0