Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Listview Horizontal

My xml (lvlayout.xml) layout for a listview is currently like this:

<TextView
    android:id="@+id/busnum"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textSize="15dip"
    android:gravity="center_horizontal" />
   <TextView
    android:id="@+id/servdate"
    android:layout_width="wrap_content"

    android:layout_height="wrap_content"
    android:textSize="10dip"
    android:textColor="#23cf34" />

I populate the listview via a simplecursor adapter like this:

dueAdapter = new SimpleCursorAdapter(main.this, R.layout.lvlayout,
            dueBusesCursor, columnsdue, to);
    dueListView = (ListView) findViewById(R.id.ListView01);
    dueListView.setAdapter(dueAdapter);

How can I make the listviews horizontal so that the user scrolls sideways ? thanks in advance.

like image 977
brux Avatar asked Jun 10 '26 13:06

brux


1 Answers

ListView does not support the horizontal mode. The closest thing to a horizontal ListView is Gallery.

like image 164
Romain Guy Avatar answered Jun 13 '26 02:06

Romain Guy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!