i need to implement this layout in android..the view must be have two list views sharing 30-70% screen space..
the list on the right side must be horizontal scrollable and vertical…the list on the left hand side must be scrollable in the vertical direction only… and each list item (record) must be in the same line when either of the list are scrolled up/down. i tried implementing the same this way, it works fine but fails to be smooth enough when scrolling…and most of the times the screen turns black..
<?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">
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content" android:orientation="horizontal">
<ListView android:id="@+id\lV1" android:layout_width="100dp"
android:layout_height="wrap_content" />
<HorizontalScrollView android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView android:id="@+id/lV2" android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</HorizontalScrollView>
</LinearLayout>
</LinearLayout>
please note, this entire layout needs to be displayed in a tab view..
I changed the layout to this, but still no good result
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:layout_width="fill_parent" android:fillViewport="true"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout android:layout_width="match_parent"
android:layout_height="fill_parent" >
<ListView android:id="@+id/lV1" android:layout_width="100px"
android:layout_height="wrap_content" android:background="@color/white"
android:fadingEdge="vertical" android:cacheColorHint="#00000000"
android:fastScrollEnabled="true" />
<HorizontalScrollView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_toRightOf="@id/listView1">
<ListView android:id="@+id/lV2" android:layout_width="wrap_content"
android:fastScrollEnabled="true" android:layout_height="wrap_content"
android:background="@color/white" android:cacheColorHint="#00000000"
android:layout_toRightOf="@id/lV1" />
</HorizontalScrollView>
</RelativeLayout>
</ScrollView>
adding
android:cacheColorHint="#00000000"to your listview should prevent the blacking out of the list