App crashes giving index out of bounds in logcat while adding footer to listview

后端 未结 1 968
南旧
南旧 2021-01-16 09:01

I have a listview which loads more listitems when it reaches 20rh listitem using onscroll listener

I want to add a footer saying loading more while more listitems ar

相关标签:
1条回答
  • 2021-01-16 09:38

    Create footer_view.xml and than just try it onCreate

    View footerView =  ((LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.footer_layout, null, false);
    list.addFooterView(footerView);
    
    0 讨论(0)
提交回复
热议问题