i have a scrollview layout, with some textviews and buttons, and also a mapview in the middle.All the content of this layout is on a scrollview, because it haves a lot of things, and user have to scroll the windows to see all.
But then i have a problem, when the user tryes to move the map, it doesn't move, and the finger scrolls the entire window, because of the scrollview. Its cool to have the possibility to scroll the entire window, but i want that when the user moves the finger on the map, the user scrolls only the map.
exist a way to fix this problem without removing the scrollview? i need it!
there is the code:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10px">
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/UserLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5px"
android:text="@string/userlabel"/>
<TextView
android:id="@+id/User"
android:layout_alignBaseline="@id/UserLabel"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/PermissionLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13px"
android:text="@string/perlabel"/>
<TextView
android:id="@+id/Permission"
android:layout_alignBaseline="@+id/PermissionLabel"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/FromLabelLocate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13px"
android:text="@string/fromlabel"/>
<TextView
android:id="@+id/FromLocate"
android:layout_alignBaseline="@+id/FromLabelLocate"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/ToLabelLocate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13px"
android:text="@string/tolabel"/>
<TextView
android:id="@+id/ToLocate"
android:layout_alignBaseline="@+id/ToLabelLocate"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/LastUpdateLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13px"
android:text="@string/lastupdatelabel"/>
<TextView
android:id="@+id/LastUpdate"
android:layout_alignBaseline="@id/LastUpdateLabel"
android:layout_alignParentRight="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RelativeLayout>
<View
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#808080"
android:layout_marginTop="5px"
android:layout_marginBottom="10px"/>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="230px"
android:clickable="true"
android:apiKey="mykey"
/>
<View
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:layout_height="1dip"
android:background="#808080"
android:layout_marginTop="10px"
android:layout_marginBottom="10px"/>
<RelativeLayout
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<Button
android:id="@+id/locate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/locate"
android:width="130px"
android:layout_marginLeft="15dip"/>
<Button
android:id="@+id/trace"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/trace"
android:width="130px"
android:layout_alignBaseline="@id/locate"
android:layout_alignParentRight="true"
android:layout_marginRight="15dip"/>
</RelativeLayout>
</LinearLayout>
</ScrollView>