0

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:

CustomAdapter-Code

arnp
  • 3,178
  • 6
  • 26
  • 43
  • There is a [similar question](http://stackoverflow.com/questions/2864331/how-to-get-an-android-widgets-size-after-layout-is-calculated), maybe this helps for you! – Caumons Feb 03 '12 at 09:52

1 Answers1

1

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

April Smith
  • 1,810
  • 2
  • 28
  • 52