I've a ListView with items containing information about places with a rating and the distance to the current location.
The items are sorted into groups:
- Group 1: within 500m
- Group 2: 500m - 1km
- Group 3: 1km - 1.5km
- ...
Withing these groups the items are sorted by their rating.
Now I put out these items via my custom adapter (extension of BaseAdapter
) into the ListView
, which works perfectly.
However, what I'd like to do is to put a separator before the each first item of each group. This separator can be a TextView
saying e.g. 500m - 1km followed by all the ListView
items in that group.
Any idea on how to realize this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…