I have a `ListView`, let's say with 10 items. Each item's layout is of height 10dp. It gives us `ListView` to be of height 100dp. 

Now after clicking the item, I dynamically add some content to it, which causes item's height to increase by next 10dp, which in total gives 20dp height. 

The problem is that when I increase the height of the item, `ListView`'s height remains same as it was, which causes bottom item to disappear - `ListView`'s height is 100dp whereas total height of items now is 110dp, which in the end results in disappearing item at the end. 

My question is - how can I force `ListView` to recalculate its size based on new sizes of its items?

I tried using `invalidate()`, but it didn't work:

```
mTestsListView.setOnItemClickListener(new OnItemClickListener() {
    @Override
    public void onItemClick(AdapterView<?> adapterView, View v, int position, long id) {
        RelativeLayout basicControlsLayout = (RelativeLayout)v.findViewById(R.id.basicControlsLayout);
        if(basicControlsLayout != null) {
            if(basicControlsLayout.getVisibility() == View.VISIBLE) {
                basicControlsLayout.setVisibility(View.GONE);
            } else {
                basicControlsLayout.setVisibility(View.VISIBLE);

                adapterView.invalidate() // doesn't work
            }
        }
    }
});

```

In the code snippet above, you can see that what I really do after clicking the item is changing visibility of a hidden layout inside it from `GONE` to `VISIBLE`, which causes item's height to increase.