Question: I'm trying to add some extra space between the 4th and 5th items in the listview. What are my options?

I tried doing that in adapter's getView(), as well as manually getting access to the fourth element and adding padding to it. 

Is there a better way to do this?

Answer: 
Another way to do this would be to use a different layout for the the 4th item (that has additional padding). It's similar to your solution but maybe a bit "cleaner". I'm assuming that you're extending **ArrayAdapter**.

In your adapter override the getViewTypeCount() method:

```
@Override public int getViewTypeCount() {
    return 2;
}

```

This way you're telling your adapter that you will use two different layouts for your items. Next, you have to specify which items will be of which type by overriding another method:

```
@Override public int getItemViewType(int position) {
    if(position == 3) {
        return 0;
    } else {
        return 1;
    }
}

```

This will tell your adapter to use a different view (only) for the 4th element in the list, and it will not be reused for other elements. Now for the last part, override **onCreateView()**:

```
 @Override public View getView(int position, View convertView, ViewGroup parent) {

    if(convertView == null) {
        LayoutInflater inflater = LayoutInflater.from(context);

        if(position == 3) {
            convertView = inflater.inflate(R.layout.your_layout_with_padding, parent, false);
        } else {
            convertView = inflater.inflate(R.layout.your_regular_item_padding, parent, false);
        } 

        //TODO this is the place to initialize your view holder

    } else {
        //TODO this is the place to restore your view holder
    }

    //TODO setup your view here

    return convertView;
}

```

For the item with position == 3 (4th item in the list) **convertView** argument of the getView() method will be null, because that is the first (and only) item of the type 1 in the list. Therefore you can inflate a different layout that includes a padding for that item.
Layout all of your items in the listview to include your data as well as a header view, maybe a textview or even a Viewgroup like another layout. Keep the header invisible until some logic in your code triggers (i.e. pos ==4) and make the header visible