i want to create listview in android with following scenario
Heading Category 1
item 1 item 2 item 3
Heading Category 2
item 1 item 2
I believe android.app.ExpandableListActivity is what you are looking for. Check out this sample: samples/android-9/ApiDemos/src/com/example/android/apis/view/ExpandableList3.java
in your Android SDK.
A part of the answer is there : http://developer.android.com/resources/tutorials/views/index.html
see also there : Android listview groups