<?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">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/firstLV"/>
<ListView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/secondLV"/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="button"/>
</LinearLayout>
</ScrollView>
I have simple linear layout with two listviews and one button inside ScrollView. I need to scroll linear layout. But now i watch full first list view and scrolled second listview. And I can't watch my button. Code for fill listviews:
ListView firstListView = (ListView)FindViewById(Resource.Id.firstLV);
ListView secondListView = (ListView)FindViewById(Resource.Id.secondLV);
string[] dataList = { "A", "B", "C", "D", "E" };
ArrayAdapter<string> adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, dataList);
firstListView.Adapter = adapter;
secondListView.Adapter = adapter;
How can I scroll exactly linear layout? Thank.