Reputation: 3208
I am using custom adapter for a listview and i need to get the listitem height for displaying the listview in a scrollview. I tried to do that in a normal listview with simple adapter. I am able to get the adapter using [listView.getAdapter()] but in case of customadapter unable to get the adapter or height of the listitem. How can i make it possible. And also unable to have listitem click.
This is my reffered link for listview in scrollview: Click here
The code of the adapter i have used is:
Upvotes: 0
Views: 991
Reputation: 1830
Because [Null pointer exception]
I guess change here,
int height = convertView.getHeight(); >> int height = vi.getHeight();
p.s. just guess, sorry for my bad if it doesn't help
Upvotes: 1