Troj
Troj

Reputation: 11911

Android: Error when scrolling down to the bottom of an ListView

I found a error that I didn't know about, I am using a List, when I am scrolling down to the bottom of the list it throws an error, why does this occur? I am getting the items from a service, and everything looks fine in ListView.

this is the error that it trows out.

09-25 16:58:01.865: ERROR/AndroidRuntime(609): FATAL EXCEPTION: main
09-25 16:58:01.865: ERROR/AndroidRuntime(609): java.lang.NullPointerException
09-25 16:58:01.865: ERROR/AndroidRuntime(609):     at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355)
09-25 16:58:01.865: ERROR/AndroidRuntime(609):     at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
....
....

Upvotes: 0

Views: 1264

Answers (1)

mreichelt
mreichelt

Reputation: 12455

It seems that one of your items in the ArrayAdapter is null - therefore you will get a NullPointerException if you scroll down to that item.

Upvotes: 2

Related Questions