Hope we have good time.dude i m stuck in a little problem .when i place vertical scroll view inside horizontal scroll view then vertical scrollview not works properly.(i tried vice verse too by placing horizontal scroll view inside vertical.)
when i try to scroll the layout just allow me to scroll in one direction not in both simultaneously. i think this is android genuine problem.
kindly provide any solution . Regards
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1" >
<LinearLayout
android:id="@+id/linearLayout21"
android:layout_width="fill_parent"
android:layout_height="40dip"
android:background="@drawable/top_bar_bg" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="1dip"
android:layout_marginTop="1dip"
android:text=" Image card"
android:textAppearance="?android:attr/textAppearanceLarge" >
</TextView>
</LinearLayout>
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Description"
android:textSize="20sp" >
</TextView>
<EditText
android:id="@+id/IMAGEVIEW_TEXTVEIW"
android:layout_width="fill_parent"
android:layout_height="100dp"
android:layout_below="@+id/textView1"
android:clickable="false"
android:cursorVisible="false"
android:focusable="false"
android:gravity="top" >
</EditText>
</RelativeLayout>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" Image"
android:textSize="20sp" >
</TextView>
</LinearLayout>
<RelativeLayout
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dip"
android:layout_marginTop="5dip"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical|fill_horizontal" >
<RelativeLayout
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_margin="5dip" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<RelativeLayout
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center" >
<RelativeLayout
android:id="@+id/relativeLayout2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true" >
<ImageView
android:id="@+id/IMAGE_VIEW"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/diamond" >
</ImageView>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</HorizontalScrollView>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
See Below xml.This works for me.Hope will work for you too.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical">
<HorizontalScrollView android:id="@+id/horizontal_scroll_view"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:scrollbars="horizontal">
<ScrollView android:id="@+id/vertical_scroll_view"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:scrollbars="vertical">
<LinearLayout android:id="@+id/linear_layout"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TableLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/layout">
<!--
<TableRow android:layout_width="wrap_content"
android:layout_height="wrap_content" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ksjdhfksjdhfksjdhfksdhfksjdhfksjdhfksjdhfkjsdhfkjsdfhkjsdfhkjhkjhkjhkjhkjhkjhkjhkjhkjhkjhkjhkjjjjjjjjjjjjjjjjjjjj"
/> </TableRow>
-->
</TableLayout>
<!--
childrens go here.. I have used an image view for demonstration
-->
</LinearLayout>
</ScrollView>
</HorizontalScrollView>
</LinearLayout>