F
F
fryette2015-05-18 22:15:05
Android
fryette, 2015-05-18 22:15:05

Scrolling two ListViews, how?

There was a problem, it is necessary to scroll two ListView.
They are displayed in order, the first sheet is short (no more than 3 elements), the second is long (about 100 elements)
.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true" >
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:local="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="fill_parent">
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <Mvx.MvxListView
            android:scrollbars="none"
            android:layout_marginTop="5dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            local:MvxItemTemplate="@layout/informationaltemplate"
            local:MvxBind="ItemsSource Train.AdditionalInformation" />
        <Mvx.MvxListView
            android:scrollbars="none"
            android:isScrollContainer="false"
            android:layout_marginTop="5dip"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            local:MvxItemTemplate="@layout/stoppointstemplate"
            local:MvxBind="ItemsSource StopPointList"
            android:id="@+id/StopPointsListView" />
    </LinearLayout>
</FrameLayout>
</ScrollView>

Problem: it does not work as it should, namely, the first sheet, as expected, displays 3 elements, the second one displays more than a hundred, and only the second one scrolls, the first is always at the top.
Maybe someone met knows how to solve the problem, I would be grateful!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question