android - ListView adapter getView() getting wrong item -
i have listview , put in following code see getview() process of baseadapter.
@override public view getview(int position, view convertview, viewgroup parent) { log.d("getview()","fetching row: " + position); ... }
as scroll down list slowly, notice strange happening. when i'm @ list position 40-50ish, it's still calling getview() position of 0-7. here log looks like:
05-14 11:46:13.989: i/getview()(18681): fetching row: 45 05-14 11:46:14.039: i/getview()(18681): fetching row: 0 05-14 11:46:14.049: i/getview()(18681): fetching row: 1 05-14 11:46:14.049: i/getview()(18681): fetching row: 2 05-14 11:46:14.049: i/getview()(18681): fetching row: 3 05-14 11:46:14.059: i/getview()(18681): fetching row: 4 05-14 11:46:14.059: i/getview()(18681): fetching row: 5 05-14 11:46:14.059: i/getview()(18681): fetching row: 6 05-14 11:46:14.069: i/getview()(18681): fetching row: 7 05-14 11:46:14.320: i/getview()(18681): fetching row: 46 05-14 11:46:14.430: i/getview()(18681): fetching row: 0 05-14 11:46:14.430: i/getview()(18681): fetching row: 1 05-14 11:46:14.430: i/getview()(18681): fetching row: 2 05-14 11:46:14.430: i/getview()(18681): fetching row: 3 05-14 11:46:14.430: i/getview()(18681): fetching row: 4 05-14 11:46:14.430: i/getview()(18681): fetching row: 5 05-14 11:46:14.430: i/getview()(18681): fetching row: 6 05-14 11:46:14.430: i/getview()(18681): fetching row: 7
as can see, in between row 45 , row 46, called getview() row 0-7, each time. happens every list item. i'm afraid causing performance issues.
why happening? , normal behavior?
in listview xml change layout_height android:layout_height="match_parent"
Comments
Post a Comment