0

The main menu for my app shows 10 options, arranged in 5 rows. I use a really simple layout involving two listviews, as follows:

<?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="wrap_content"
    android:orientation="horizontal" >

    <ListView
        android:id="@+id/list1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:fadeScrollbars="true"
        android:divider="#00000000" />

    <ListView
        android:id="@+id/list2"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:fadeScrollbars="true"
        android:divider="#00000000" />

</LinearLayout>

I use a fairly plain row layout for phones and a fancier one for tablets, and it all works out very nicely. But when the phone is held in portrait mode, the two listviews begin to scroll. That is fine, except that they scroll independently. It would be better if they scrolled in sync. Any ideas how I can achieve this? It is not a deal breaker, so I am looking for a simple solution, but I cannot think of one.

Philip Sheard
  • 5,789
  • 5
  • 27
  • 42
  • I think this link can help you [this][1] and [this][2] [1]: http://stackoverflow.com/questions/3527119/sync-two-scrollview [2]: http://stackoverflow.com/questions/7870546/synchronizing-two-horizontal-scroll-views-in-android –  Nov 22 '12 at 10:54

1 Answers1

0

The solution is incredibly simple - I just use a gridview instead of two listviews. Job done.

Philip Sheard
  • 5,789
  • 5
  • 27
  • 42