Android by default does not support section headers in ListView. Based on my research, I found out that there are two ways to implement a section title in a ListView. The first of these is support for two types of views in a list view: a separator view and a content view. The second is to include the separator view in all kinds of content and simply set the visibility of the separator view in both VISIBLE and GONE. I am using the second method.
However, when I look up the ListView, the section title also scrolls up. I know this is normal. But I want the section title to stay on top while some data related to its section is still displayed. The behavior I want to execute is similar to the behavior of the UITableView section headings in iOS. How can i do this?
In addition, I would like to note that I read that one of the solutions for this is to create a view over the ListView and just change it if necessary. However, this will not work for all phones. For example, ListView phones on Samsung bounce. If I put the view above the ListView as the title, and the bends of the ListView, the dummy title view will not bounce with the ListView. In addition, the top of the default ListView can be easily seen because it glows when the ListView scrolls. Is there a way to accomplish the above effect, making sure it still looks natural?
The following figure shows the problem that I encountered if I just add a text view on top of the list: (taken from Samsung Galaxy S2)

source share