Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android :how to set Fixed no(5 ) of Rows shows in ListView then after Scroll?

Tags:

android

how to set Fixed no of Rows shows in ListView ? i want to set 5 Rows only show in Listview not all Rows. so how can i achive this Goal?

like image 320
Hardik Gajjar Avatar asked Sep 22 '11 05:09

Hardik Gajjar


1 Answers

yes, you can achieve via adapter class, Try with following code in your adapter class.

 public int getCount() {
        return 5;
    }

If you set this, the adapter class load only 5 items.

like image 91
ilango j Avatar answered Oct 04 '22 00:10

ilango j