Creating scrollView below an ImageView - android

i have got an activity that has an image at the top of the screen. everything below the Image needs to be scrollable. see picture below:
I have tries placing the ScrollView Layout below the picture but i keep on getting an error saying "Unexpected end of statement" but the opening tag for ScrollView is correct so i am going crazy!
here is my XML code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true">
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.rkmsolutions.restaurantapp.MainActivity">
<ImageView
android:id="#+id/sapori_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="#drawable/sapori_logo_cropped"
tools:ignore="ContentDescription" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/sapori_banner">
<ImageView
android:id="#+id/olivesAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="#drawable/olives512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/oliveAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="start"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/olivesAppetizerTitleTxtView"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/oliveAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/olivesAppetiserImage"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="center_vertical"
android:text="#string/oliveAppetizerDescription" />
<TextView
android:id="#+id/oliveAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/oliveAppetisersBodyDescription"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toRightOf="#+id/oliveAppetisersBodyDescription"
android:gravity="center"
android:text="#string/oliveAppetiserPriceText" />
<ImageView
android:id="#+id/bruschettaAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/olivesAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/bruschetta512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/bruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/bruschettaAppetiserImage"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/bruschettaAppetiserTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold"/>
<TextView
android:id="#+id/bruschettaAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_below="#+id/bruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserDescription" />
<TextView
android:id="#+id/bruschettaAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/bruschettaAppetisersBodyDescription"
android:layout_toEndOf="#+id/bruschettaAppetisersBodyDescription"
android:layout_toRightOf="#+id/bruschettaAppetisersBodyDescription"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserPriceText"
android:textAlignment="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="#drawable/vegetarian_bruschetta512x512"
tools:ignore="ContentDescription"
android:id="#+id/veggieBruschettaAppetiserImage"
android:layout_below="#+id/bruschettaAppetiserImage"/>
<TextView
android:id="#+id/veggieBruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/veggieBruschettaAppetiserImage"
android:layout_toEndOf="#+id/veggieBruschettaAppetiserImage"
android:layout_toRightOf="#+id/veggieBruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/veggieBruschettaTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/veggieBruschettaDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"
android:layout_below="#+id/veggieBruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="Toasted bread with grilled vegetarian antipasti" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/veggieBruschettaPrice"
android:gravity="center"
android:textAlignment="center"
android:text="#string/veggieBruschettaPriceString"
android:layout_toRightOf="#id/veggieBruschettaDescription"
android:layout_toEndOf="#+id/veggieBruschettaDescription"
android:layout_alignTop="#+id/veggieBruschettaDescription"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"/>
<ImageView
android:id="#+id/paneAglioImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:layout_below="#+id/veggieBruschettaAppetiserImage"
android:src="#drawable/garlic_bread_pizza512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/paneAglioTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/paneAglioImage"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/paneAglioTitleString"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:id="#+id/paneAglioDescription"
android:gravity="center_vertical"
android:text="#string/paneAglioDescriptionString"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:layout_below="#+id/paneAglioTitle"
android:layout_alignBottom="#+id/paneAglioImage"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:gravity="center"
android:textAlignment="center"
android:layout_alignBottom="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioDescription"
android:layout_toEndOf="#+id/paneAglioDescription"
android:text="#string/paneAglioPriceString"
android:layout_alignTop="#+id/paneAglioDescription"/>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
it will be a simple solution but i just dont know what else to try!
thanks SO!

<?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"
tools:context="com.rkmsolutions.restaurantapp.MainActivity">
<ImageView
android:id="#+id/sapori_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="#drawable/sapori_logo_cropped"
tools:ignore="ContentDescription" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/sapori_banner">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/olivesAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="#drawable/olives512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/oliveAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="start"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/olivesAppetizerTitleTxtView"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/oliveAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/olivesAppetiserImage"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="center_vertical"
android:text="#string/oliveAppetizerDescription" />
<TextView
android:id="#+id/oliveAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/oliveAppetisersBodyDescription"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toRightOf="#+id/oliveAppetisersBodyDescription"
android:gravity="center"
android:text="#string/oliveAppetiserPriceText" />
<ImageView
android:id="#+id/bruschettaAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/olivesAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/bruschetta512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/bruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/bruschettaAppetiserImage"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/bruschettaAppetiserTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/bruschettaAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_below="#+id/bruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserDescription" />
<TextView
android:id="#+id/bruschettaAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/bruschettaAppetisersBodyDescription"
android:layout_toEndOf="#+id/bruschettaAppetisersBodyDescription"
android:layout_toRightOf="#+id/bruschettaAppetisersBodyDescription"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserPriceText"
android:textAlignment="center" />
<ImageView
android:id="#+id/veggieBruschettaAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/bruschettaAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/vegetarian_bruschetta512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/veggieBruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/veggieBruschettaAppetiserImage"
android:layout_toEndOf="#+id/veggieBruschettaAppetiserImage"
android:layout_toRightOf="#+id/veggieBruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/veggieBruschettaTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/veggieBruschettaDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"
android:layout_below="#+id/veggieBruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="Toasted bread with grilled vegetarian antipasti" />
<TextView
android:id="#+id/veggieBruschettaPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/veggieBruschettaDescription"
android:layout_toEndOf="#+id/veggieBruschettaDescription"
android:layout_toRightOf="#id/veggieBruschettaDescription"
android:gravity="center"
android:text="#string/veggieBruschettaPriceString"
android:textAlignment="center" />
<ImageView
android:id="#+id/paneAglioImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/veggieBruschettaAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/garlic_bread_pizza512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/paneAglioTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/paneAglioImage"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/paneAglioTitleString"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/paneAglioDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/paneAglioImage"
android:layout_below="#+id/paneAglioTitle"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:gravity="center_vertical"
android:text="#string/paneAglioDescriptionString" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/paneAglioImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/paneAglioDescription"
android:layout_toEndOf="#+id/paneAglioDescription"
android:layout_toRightOf="#+id/paneAglioDescription"
android:gravity="center"
android:text="#string/paneAglioPriceString"
android:textAlignment="center" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>

You should put your ImageView on a RelativeLayout with alignParentTop attribute. And you should define a container layout for your ImageView and TextViews.
Key point here ; ScrollView can only host one children. So you will add your container layout inside ScrollView and you will define layout_below attribute to make it below on your banner
<?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"
tools:context="com.rkmsolutions.restaurantapp.MainActivity">
<ImageView
android:id="#+id/sapori_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="#drawable/sapori_logo_cropped"
tools:ignore="ContentDescription" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/sapori_banner">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/olivesAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:src="#drawable/olives512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/oliveAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="start"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/olivesAppetizerTitleTxtView"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/oliveAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/olivesAppetiserImage"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toEndOf="#+id/olivesAppetiserImage"
android:layout_toRightOf="#+id/olivesAppetiserImage"
android:gravity="center_vertical"
android:text="#string/oliveAppetizerDescription" />
<TextView
android:id="#+id/oliveAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/oliveAppetisersBodyDescription"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_below="#+id/oliveAppetiserTitle"
android:layout_toRightOf="#+id/oliveAppetisersBodyDescription"
android:gravity="center"
android:text="#string/oliveAppetiserPriceText" />
<ImageView
android:id="#+id/bruschettaAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/olivesAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/bruschetta512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/bruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/bruschettaAppetiserImage"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/bruschettaAppetiserTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/bruschettaAppetisersBodyDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_below="#+id/bruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserDescription" />
<TextView
android:id="#+id/bruschettaAppetiserPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/bruschettaAppetiserImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/bruschettaAppetisersBodyDescription"
android:layout_toEndOf="#+id/bruschettaAppetisersBodyDescription"
android:layout_toRightOf="#+id/bruschettaAppetisersBodyDescription"
android:gravity="center_vertical"
android:text="#string/bruschettaAppetiserPriceText"
android:textAlignment="center" />
<ImageView
android:id="#+id/veggieBruschettaAppetiserImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/bruschettaAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/vegetarian_bruschetta512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/veggieBruschettaAppetiserTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/veggieBruschettaAppetiserImage"
android:layout_toEndOf="#+id/veggieBruschettaAppetiserImage"
android:layout_toRightOf="#+id/veggieBruschettaAppetiserImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/veggieBruschettaTitle"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/veggieBruschettaDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"
android:layout_below="#+id/veggieBruschettaAppetiserTitle"
android:layout_toEndOf="#+id/bruschettaAppetiserImage"
android:layout_toRightOf="#+id/bruschettaAppetiserImage"
android:gravity="center_vertical"
android:text="Toasted bread with grilled vegetarian antipasti" />
<TextView
android:id="#+id/veggieBruschettaPrice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/veggieBruschettaAppetiserImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/veggieBruschettaDescription"
android:layout_toEndOf="#+id/veggieBruschettaDescription"
android:layout_toRightOf="#id/veggieBruschettaDescription"
android:gravity="center"
android:text="#string/veggieBruschettaPriceString"
android:textAlignment="center" />
<ImageView
android:id="#+id/paneAglioImage"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/veggieBruschettaAppetiserImage"
android:scaleType="centerCrop"
android:src="#drawable/garlic_bread_pizza512x512"
tools:ignore="ContentDescription" />
<TextView
android:id="#+id/paneAglioTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/paneAglioImage"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:text="#string/paneAglioTitleString"
android:textColor="#b71c1c"
android:textSize="15sp"
android:textStyle="bold" />
<TextView
android:id="#+id/paneAglioDescription"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/paneAglioImage"
android:layout_below="#+id/paneAglioTitle"
android:layout_toEndOf="#+id/paneAglioImage"
android:layout_toRightOf="#+id/paneAglioImage"
android:gravity="center_vertical"
android:text="#string/paneAglioDescriptionString" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/paneAglioImage"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignTop="#+id/paneAglioDescription"
android:layout_toEndOf="#+id/paneAglioDescription"
android:layout_toRightOf="#+id/paneAglioDescription"
android:gravity="center"
android:text="#string/paneAglioPriceString"
android:textAlignment="center" />
</RelativeLayout>

Try this way it will work
<?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"
xmlns:ads="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:id="#+id/header"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentTop="true"
android:background="#689F38"
android:gravity="center"
android:layout_gravity="center">
<TextView
android:id="#+id/header_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/header_msg"
android:textColor="#FFFFFF"
android:textSize="25sp"/>
</RelativeLayout>
<RelativeLayout
android:id="#+id/footer"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:background="#689F38"
android:gravity="center"
android:layout_gravity="center">
<TextView
android:id="#+id/footer_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/footer_msg"
android:textColor="#FFFFFF"
android:gravity="center"
android:textSize="25sp"/>
</RelativeLayout>
<ScrollView
android:id="#+id/scroll_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="#+id/footer"
android:layout_below="#+id/header"
android:fillViewport="true">
<LinearLayout
android:id="#+id/myLayout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
android:fillViewport="true">
<TextView
android:id="#+id/bodytext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/body_msg"
android:textColor="#F44336"
android:gravity="center"
android:textSize="25sp"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>
For more check this

Related

(Android studio) ScrollView won't scroll all the way to the bottom

im trying to put a scroll view inside a frame layout. My scroll view is not scrolling all the way to bottom. this is my xml code. It is working when i give a padding to scroll view. but i need a better answer. because giving a padding will make a white margin below my application. Thank you!
<FrameLayout 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="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
// this is your first layout to put the big image
// use src or backgroud image as per requirement
<LinearLayout
android:background="#drawable/bg"
android:layout_width="match_parent"
android:layout_height="180dp">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="#+id/imageView"
android:background="#drawable/overly" />
</LinearLayout>
// this is your bottom layout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ffc9c9c9"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:id="#+id/relativeLayout"
android:layout_marginTop="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Anna Huffmunster"
android:id="#+id/textView2"
android:textStyle="bold"
android:textSize="20dp"
android:gravity="center"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:paddingTop="40dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Colombo Sri lanka"
android:id="#+id/txt_location"
android:textSize="15dp"
android:gravity="center"
android:textStyle="italic"
android:textColor="#696969"
android:paddingBottom="7dp"
android:paddingTop="5dp"
android:layout_below="#+id/textView2"
android:layout_centerHorizontal="true" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="#+id/scrollView"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentStart="true"
android:layout_below="#+id/relativeLayout"
android:layout_marginTop="12dp"
android:id="#+id/relativeLayout2">
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/imageButton"
android:background="#drawable/call_button"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/imageButton2"
android:background="#drawable/chat_button"
android:layout_alignParentTop="true"
android:layout_toStartOf="#+id/imageButton"
android:layout_marginRight="30dp" />
<ImageButton
android:layout_width="50dp"
android:layout_height="50dp"
android:id="#+id/imageButton3"
android:background="#drawable/location_button"
android:layout_alignParentTop="true"
android:layout_toEndOf="#+id/imageButton"
android:layout_marginLeft="30dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/relativeLayout2"
android:layout_alignParentStart="true"
android:layout_marginTop="12dp"
android:id="#+id/relativeLayout3">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="“Live each day as if your life had just begun.” "
android:id="#+id/txt_status"
android:textColor="#ffd9162d"
android:textSize="12dp"
android:textStyle="italic"
android:gravity="center"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/relativeLayout3"
android:layout_alignParentStart="true">
<TextView
android:text="Birthday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView3"
android:textSize="12sp"
android:layout_marginStart="75dp"
android:layout_marginTop="23dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:textColor="#000" />
<TextView
android:text="19 MAR 1992"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView4"
android:inputType="date"
android:layout_marginEnd="79dp"
android:textSize="12sp"
android:layout_alignBaseline="#+id/textView3"
android:layout_alignBottom="#+id/textView3"
android:layout_alignParentEnd="true" />
<TextView
android:text="Profession"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView5"
android:layout_below="#+id/textView3"
android:layout_alignStart="#+id/textView3"
android:layout_marginTop="20dp"
android:textColor="#000"
android:textSize="12sp" />
<TextView
android:text="Software Engineer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView6"
android:textSize="12sp"
android:maxWidth="20dp"
android:layout_alignTop="#+id/textView5"
android:layout_alignStart="#+id/textView4"
android:layout_alignEnd="#+id/textView4" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true">
<TextView
android:text="dgsdfsdfdfsdfsdfvv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView8"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
<TextView
android:text="dgsdfsdfdfsdfsdfvv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView11"
android:layout_below="#+id/textView8"
android:layout_alignParentStart="true" />
<TextView
android:text="dgsdfsdfdfsdfsdfvv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView9"
android:layout_below="#+id/textView11"
android:layout_alignParentStart="true" />
<TextView
android:text="dgsdfsdfdfsdfsdfvv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/textView10"
android:layout_below="#+id/textView9"
android:layout_alignParentStart="true" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
// This is the imageview which overlay the first LinearLayout
<ImageView
android:layout_width="122dp"
android:layout_height="122dp"
android:src="#drawable/circle_profile_pic"
android:adjustViewBounds="true"
android:layout_gravity="center_horizontal"
android:layout_marginTop="100dp"
android:background="#drawable/stroke"/>

Overlaying an imageview relative to another layout

This is what I'm trying to achieve:
I'm trying to add an ImageView (cirlce avatar) which is aligned to the bottom right of the top bar but with an overlay extending below the bar.
Here's what I have so far:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="#ff652c90">
<ImageButton
android:layout_width="25dp"
android:layout_height="25dp"
android:id="#+id/backBtn"
android:src="#drawable/backarrow"
android:background="#android:color/transparent"
android:paddingLeft="10dp"
android:layout_centerVertical="true"
android:scaleType="fitCenter"
android:layout_gravity="center_vertical" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/backBtn"
android:id="#+id/infoLayout"
android:layout_centerVertical="true">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Lesky"
android:id="#+id/contactName"
android:textColor="#ffffffff"
android:paddingLeft="10dp"
android:textSize="16dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="last online 22/4/2016 11:36 am"
android:id="#+id/lastSeen"
android:layout_below="#id/contactName"
android:textColor="#ffd1d2d4"
android:paddingLeft="10dp"
android:textSize="10dp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:id="#+id/imageView"
android:src="#drawable/contactpiccirlce"
android:scaleType="fitCenter" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/chatView"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="#android:color/black"
android:layout_alignBottom="#id/chatView"
android:id="#+id/postArea">
<EditText
android:layout_width="wrap_content"
android:layout_height="30dp"
android:inputType="textMultiLine"
android:minHeight="30dp"
android:ems="10"
android:id="#+id/editText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
How can anyone achieve this?
Replace with this
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="#+id/firstLayout"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="#ff652c90" >
<ImageButton
android:id="#+id/backBtn"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical"
android:background="#android:color/transparent"
android:paddingLeft="10dp"
android:scaleType="fitCenter"
android:src="#drawable/backarrow" />
<RelativeLayout
android:id="#+id/infoLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toRightOf="#id/backBtn" >
<TextView
android:id="#+id/contactName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:text="Lesky"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#ffffffff"
android:textSize="16dp" />
<TextView
android:id="#+id/lastSeen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#id/contactName"
android:paddingLeft="10dp"
android:text="last online 22/4/2016 11:36 am"
android:textColor="#ffd1d2d4"
android:textSize="10dp" />
</RelativeLayout>
</RelativeLayout>
<ImageView
android:id="#+id/imageView"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:layout_marginTop="35dp"
android:scaleType="fitCenter"
android:src="#drawable/contactpiccirlce" />
<RelativeLayout
android:id="#+id/secondLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="#+id/firstLayout" >
<ListView
android:id="#+id/chatView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />
<LinearLayout
android:id="#+id/postArea"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:layout_alignBottom="#id/chatView"
android:background="#android:color/black"
android:orientation="vertical" >
<EditText
android:id="#+id/editText"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:ems="10"
android:inputType="textMultiLine"
android:minHeight="30dp" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
How about this:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="#+id/infoLayout">
<ImageButton
android:layout_width="25dp"
android:layout_height="25dp"
android:id="#+id/backBtn"
android:src="#drawable/backarrow"
android:background="#android:color/transparent"
android:paddingLeft="10dp"
android:layout_centerVertical="true"
android:scaleType="fitCenter"
android:layout_gravity="center_vertical" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/backBtn"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Lesky"
android:id="#+id/contactName"
android:textColor="#ffffffff"
android:paddingLeft="10dp"
android:textSize="16dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="#id/backBtn"
android:text="last online 22/4/2016 11:36 am"
android:id="#+id/lastSeen"
android:layout_below="#id/contactName"
android:textColor="#ffd1d2d4"
android:paddingLeft="10dp"
android:textSize="10dp" />
</RelativeLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignRight="#id/infoLayout"
android:layout_alignTop="#id/infoLayout"
android:padding="10dp"
android:scaleType="center"
android:id="#+id/imageView"
android:src="#drawable/contactpiccirlce"
android:scaleType="fitCenter" />

Floating Action Button not working over ListView

I have a floating action button over a listview, but I can't click on the button when the list fills up so that the button and the list overlap. In that situation only the list item is clickable. How do I rectify this issue? Thanks in advance. My xml code is below.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="#+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3dp"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp"
card_view:cardCornerRadius="1dp"
card_view:cardElevation="5dp">
<RelativeLayout
android:id="#+id/layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="#+id/frameLayout"
android:layout_centerHorizontal="true"
android:layout_gravity="bottom"
android:background="#000000"
android:orientation="vertical"
android:padding="1.5dp"
android:weightSum="1">
<TextView
android:id="#+id/txtTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="#660033"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
<RelativeLayout
android:id="#+id/frameLayout"
android:layout_width="fill_parent"
android:layout_height="300dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginTop="29dp"
android:background="#android:color/darker_gray"
android:padding="2dp">
<TextView
android:id="#+id/txtLocation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispLoc"
android:layout_gravity="left|top"
android:text="[Location]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/txtDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispDesc"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="1dp"
android:text="[Description]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/dispLoc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="#string/loc"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/dispDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtLocation"
android:layout_gravity="left|center_vertical"
android:layout_marginTop="17dp"
android:text="#string/desc"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/dispContact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtDesc"
android:layout_marginTop="25dp"
android:text="#string/contact"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="#+id/txtContact"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/dispContact"
android:layout_toEndOf="#+id/dispLoc"
android:autoLink="email"
android:text="[ContactInfo]"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="#+id/From"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/dispContact"
android:layout_marginTop="16dp"
android:text="#string/from"
android:textColor="#android:color/primary_text_light" />
<TextView
android:id="#+id/txtStartDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/From"
android:layout_marginLeft="10dp"
android:layout_toEndOf="#+id/From"
android:text="[Start Date]"
android:textColor="#android:color/secondary_text_light" />
<TextView
android:id="#+id/To"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_below="#+id/txtStartDate"
android:text="#string/to"
android:textColor="#android:color/primary_text_light" />
<TextView
android:id="#+id/txtEndDate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="#+id/txtStartDate"
android:layout_alignTop="#+id/To"
android:text="[End Date]"
android:textColor="#android:color/secondary_text_light" />
<Button
android:id="#+id/attend_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:text="Attend" />
<Button
android:id="#+id/cancel_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignStart="#+id/txtContact"
android:text="Cancel" />
</RelativeLayout>
<TextView
android:id="#+id/txtType"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="#+id/txtTitle"
android:layout_alignEnd="#+id/txtTitle"
android:text="Type"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
</RelativeLayout>
</android.support.v7.widget.CardView>
<TextView
android:id="#+id/peopleAttending"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/card_view"
android:background="#660033"
android:text="#string/people_attending"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#android:color/primary_text_dark" />
<org.lucasr.twowayview.TwoWayView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/lvItems"
style="#style/TwoWayView"
android:layout_width="match_parent"
android:layout_height="37dp"
android:layout_below="#+id/peopleAttending"
android:drawSelectorOnTop="false"
tools:context=".DetailedEventActivity" />
<com.software.shell.fab.ActionButton xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="#+id/action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="#dimen/fab_margin"
android:layout_marginEnd="#dimen/fab_margin"
fab:button_color="#color/fab_material_red_500"
fab:button_colorPressed="#color/fab_material_red_900"
fab:hide_animation="#anim/fab_roll_to_down"
fab:image="#drawable/fab_plus_icon"
fab:image_size="24dp"
fab:shadow_color="#757575"
fab:shadow_radius="1.0dp"
fab:shadow_xOffset="0.5dp"
fab:shadow_yOffset="1.0dp"
fab:show_animation="#anim/fab_roll_from_down"
fab:stroke_color="#color/fab_material_blue_grey_500"
fab:stroke_width="1.0dp"
fab:type="DEFAULT"
android:clickable="true"/>
<ListView
android:id="#+id/commentsList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/lvItems"
android:layout_marginTop="0dp"
/>
Move your FAB to the bottom of the XML (below the ListView).

Can't implements Scrollview in XML

why I can not show the scroll view in my project, when run does not look scrollview in my project, do I put scrollview not quite right? How Scrollview placement should be, so that all items that are in my project can get scrollview This my XML Code
activity.xml
<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:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:text="#string/cast"
android:layout_marginTop="5dp"
android:textSize="14sp" />
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:layout_marginTop="5dp"
android:textSize="18sp" />
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/ivPosterImage"
android:layout_marginTop="10dp"
android:id="#+id/scrollView1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
</ScrollView>
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:textSize="17sp"
android:text="#string/synopsis" />
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_alignTop="#+id/scrollView1"
android:text="#string/cosensus"
android:textSize="17sp" />
</RelativeLayout>
Your scrollview height should not be defined in wrap because you want it to scroll.
Also the linear inside the scroll should be in wrap for its height and have some elements inside.
Suggestion if you don't mind using linears :
<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:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ScrollView
android:id="#+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="10dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:textSize="18sp" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:layout_marginTop="5dp"
android:text="#string/cast"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cosensus"
android:textSize="17sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:text="#string/synopsis"
android:textSize="17sp" />
</LinearLayout>
</ScrollView>
</RelativeLayout>
<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:padding="5dp"
tools:context=".BoxOfficeDetailActivity" >
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:id="#+id/scrollView1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<ImageView
android:id="#+id/ivPosterImage"
android:layout_width="150dp"
android:layout_height="200dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:adjustViewBounds="true"
android:maxHeight="300dp"
android:src="#drawable/large_movie_poster" />
<TextView
android:id="#+id/tvCriticsScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvTitle"
android:layout_below="#+id/tvTitle"
android:layout_marginTop="5dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/critics_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvCast"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvAudienceScore"
android:layout_below="#+id/tvAudienceScore"
android:text="#string/cast"
android:layout_marginTop="5dp"
android:textSize="14sp" />
<TextView
android:id="#+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="#+id/ivPosterImage"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/ivPosterImage"
android:text="#string/movie_title"
android:layout_marginTop="5dp"
android:textSize="18sp" />
<TextView
android:id="#+id/tvAudienceScore"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/tvCriticsScore"
android:layout_below="#+id/tvCriticsScore"
android:layout_marginTop="5dp"
android:text="#string/audi_score"
android:textSize="14sp" />
<TextView
android:id="#+id/tvSynopsis"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/scrollView1"
android:layout_below="#+id/tvCriticsConsensus"
android:layout_marginTop="48dp"
android:textSize="17sp"
android:text="#string/synopsis" />
<TextView
android:id="#+id/tvCriticsConsensus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/cosensus"
android:textSize="17sp" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>

RelativeLayout height fill_parent doesn't work in item listview layout

i have item listview layout with relative layout , but when i'm set "fill_parent" height, it's seem not fill, how make it ?
this
<?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:id="#+id/layout_full"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
android:layout_margin="4dp"
android:background="#drawable/inbox_interface" >
<TextView
android:id="#+id/textView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="TextView" />
</LinearLayout>
<ImageView
android:id="#+id/favorite_anim"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:contentDescription="#string/favorite_anime"
android:src="#drawable/favorite_active" />
<RelativeLayout
android:id="#+id/lay_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp" >
<TextView
android:id="#+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="6dp"
android:layout_marginTop="1dp"
android:layout_toLeftOf="#+id/act_item_list"
android:layout_toRightOf="#+id/avatardetail"
android:textColor="#6495ed"
android:textSize="16sp"
android:textStyle="bold"
android:typeface="sans" />
<TextView
android:id="#+id/date"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignLeft="#+id/username"
android:layout_alignRight="#+id/username"
android:layout_below="#+id/username"
android:layout_marginBottom="4dp"
android:textColor="#555555"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="sans" />
<ImageView
android:id="#+id/act_item_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:contentDescription="#string/act_item_list"
android:src="#drawable/act_list" />
<com.droidersuin.project.utils.RoundedImageView
android:id="#+id/avatardetail"
android:layout_width="40dp"
android:layout_height="40dp"
android:scaleType="centerCrop"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="#drawable/avatar_user" />
</RelativeLayout>
<LinearLayout
android:id="#+id/isi_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/lay_top"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:orientation="vertical" >
<RelativeLayout
android:id="#+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="#+id/judul"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:textColor="#6495ed"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="#+id/id_tulisan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/judul"
android:visibility="gone" />
<TextView
android:id="#+id/avatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/id_tulisan"
android:visibility="gone" />
<TextView
android:id="#+id/kordinat_lokasi"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/avatar"
android:visibility="gone" />
<TextView
android:id="#+id/judul_seo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/kordinat_lokasi"
android:visibility="gone" />
<TextView
android:id="#+id/status_gambar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/judul_seo"
android:visibility="gone" />
<TextView
android:id="#+id/gambar_tulisan_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="#+id/status_gambar"
android:visibility="gone" />
<ImageView
android:id="#+id/gambar_tulisan"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_alignParentLeft="true"
android:layout_below="#+id/judul"
android:layout_gravity="top"
android:layout_marginBottom="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="6dp"
android:background="#drawable/image_bg"
android:contentDescription="#string/gambar_tulisan"
android:cropToPadding="true"
android:scaleType="centerCrop"
android:src="#drawable/detail_droidersuin" />
<TextView
android:id="#+id/sekilas_isi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBaseline="#+id/gambar_tulisan"
android:layout_alignTop="#+id/gambar_tulisan"
android:layout_below="#+id/judul"
android:layout_toRightOf="#+id/gambar_tulisan"
android:textColor="#555555"
android:textSize="14sp" />
</RelativeLayout>
<LinearLayout
android:id="#+id/CommentLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:paddingBottom="4dp" >
<TextView
android:id="#+id/dibaca"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:paddingTop="4dp"
android:textColor="#555555"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="sans" />
<ImageView
android:id="#+id/reader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="4dp"
android:contentDescription="#string/reader"
android:src="#drawable/reader" />
<TextView
android:id="#+id/jmlh_komentar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="4dp"
android:textColor="#555555"
android:textSize="12sp"
android:textStyle="italic"
android:typeface="sans" />
<ImageView
android:id="#+id/ic_komentar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp"
android:contentDescription="#string/ic_komentar"
android:src="#drawable/comment" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="#+id/action_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/isi_layout"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:clickable="false" >
<ImageButton
android:id="#+id/favorite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="#drawable/button_action_indicator"
android:contentDescription="#string/button_favorite"
android:src="#drawable/favorite_noactive" />
<ImageButton
android:id="#+id/share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/comment"
android:background="#drawable/button_action_indicator"
android:contentDescription="#string/button_share"
android:src="#drawable/share" />
<ImageButton
android:id="#+id/comment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginLeft="8dp"
android:layout_toRightOf="#+id/favorite"
android:background="#drawable/button_action_indicator"
android:contentDescription="#string/button_comment"
android:src="#drawable/komentar" />
</RelativeLayout>
</RelativeLayout>
the problem is here , the linearlayout not fill height , but width no problem ,
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true"
android:layout_margin="4dp"
android:background="#drawable/inbox_interface" >
if it is run on the phone, even like this
the view just looks line black line
but I want to look like this
sorry for my english
While inside the code (or the adapter), you could try this, get the height of the screen and set the minimumHeight of the linear layout or relative layout to the height that you obtain.
to get the height of the screen follow this

Categories

Resources