user3199693
user3199693

Reputation: 148

ListView add View at the desired position in the list

Is there a method similar to ListView#AddHeader or ListView#AddFooter which will add view after desired position in the list?

Upvotes: 0

Views: 573

Answers (3)

Oguz Özkeroglu
Oguz Özkeroglu

Reputation: 3057

May be check out this project on github: StickyListHeaders

enter image description here

Upvotes: 1

Ari Waisberg
Ari Waisberg

Reputation: 1304

If I understand you correctly you want to add OTHER controls in the view? After and Before the ListView???

Just wrap the ListView in a LinearLayout (orientation=vertical) and insert the views that you want...

I hope it helps you!

Upvotes: 0

Mohammad Rahchamani
Mohammad Rahchamani

Reputation: 5220

You can simply add your row to your data set in desired position and then call notifyDataSetChanged();

Upvotes: 0

Related Questions