List view scroll issue

by Muthu Kumar K. » Wed, 29 Apr 2009 16:39:30 GMT

Sponsored Links
 Hi All,

I have developed an android application which is having list views.
Here i have two different pages (list view), which is having 6 and 150
list items. Right now i am in second page. It is having the 150 items.
Now i am scrolling the page, at the same time i am trying to navigate
different or previous page using the button action. That time I am
getting the crash. That means ArrayIndexOutOfBoundsException i am
getting. I am using the custom adapter to create list menu. Here is my

private class CustomListAdapter extends BaseAdapter {
                Context context;
                public CustomListAdapter(Context context) {
                        this.context = context;
                public int getCount() {
                        return toDisplay.length;
                public Object getItem(int arg0) {
                        return toDisplay[arg0];
                public long getItemId(int position) {
                        return 0;
                public View getView(int position, View convertView, ViewGroup
parent) {
                        CustomListView view = null;

                         My code here...
                        view = new CustomListView(context, sType, bmImg, 
                        return view;

While coming navigating i am getting the problem in the following line
"public View getView(int position, View convertView, ViewGroup
because I am getting the position value as greater than 6. So can any
one tell me how to resolve this.
I think the problem in list view scrolling. So before navigating to
other screen i have to stop the scrolling. How to do that?
Please let me know your suggestions.

Thanks in Advance,
Muthu Kumar K.

Other Threads

1. Fwd: Setting up ADB on hawkboard

Hi Akshat
You can see the complete ouput while setting up ADB.


---------- Forwarded message ----------
From: Srinidhi K V <>
Date: Thu, Jan 13, 2011 at 1:10 PM
Subject: Re: [android-porting] Setting up ADB on hawkboard
To: Akshat Saha <>

Hi Akshat,

Thanks for replying.
root@srinidhi-desktop:/etc# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"

SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"

The first one is for my samsung Galaxy phone and second is for TI's
Hawkboard. But when I connect the Hawk board's USB OTG to host system device
does not get enumerated.

There is no /proc/bus/usb in my Ubuntu Lucid system and hence

$ sudo mount -t usbfs none /proc/bus/usb fails.

however my galaxy phone does get listed upon adb devices.


On Thu, Jan 13, 2011 at 12:50 PM, Akshat Saha <

>> website: 

2. Listening to HFP events

We've a bluetooth application which uses SPP protocol. For better
connection manageability, in our app we would like to listen to HFP
related events like Bluetooth connected/disconnected. Is that
possible? Is there a list of Bluetooth events that we can listen to?


3. what is HIPRI connection

4. how to remove audio service form android.

5. EditText with Cross

6. Sekilas info: Peluncuran Axioo terbaru tipe HNM

7. Wajah Baru Google Translate Untuk Android