0

So I'm having this XML File:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/viplounge"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<WebView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/wview"
    android:orientation="vertical"
    android:background="@android:color/black"
    />


    <ListView
    android:layout_height="wrap_content"
    android:layout_width="match_parent"
    android:id="@+id/viplist"
    android:layout_below="@id/wview"
    />
   </RelativeLayout>

Where the WebView is loading Text from my strings.xml, the text is formatted with HTML for a better displaying experience and is quiet long, so it doesn't fit on the display and the WebView is therefore scrollable.

Under the WebView(Text) I'm parsing a XML File with some data from the Internet which is displayed in a ListView.

So my problem is, that I can't get the ListView below my WebView plus I want to manage it like that: When I'm done scrolling in my WebView I want to show the ListView below. So the User has to go down the Text/WebView and then he can read the information from the ListView.

The App is basically describing a location and under the description there should be the list of dates when the location is available and when not. Just to get you an Idea of what I'm doing here.

KayD
  • 372
  • 5
  • 17

1 Answers1

0

you can use NestedScrollView

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

<RelativeLayout 
    android:id="@+id/viplounge"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <WebView
        android:id="@+id/wview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/black"
        android:orientation="vertical" />


    <ListView
        android:id="@+id/viplist"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/wview" />
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>
MHP
  • 2,613
  • 1
  • 16
  • 26