How to show a button at the end of an Android ListView

前端 未结 9 1166
臣服心动
臣服心动 2020-12-02 12:18

I want to show a button at the end of an Android list view. How can I achieve this?

I don\'t want to stick it to the activity bottom using alignparentbottom=

9条回答
  •  庸人自扰
    2020-12-02 13:10

    You could do something like this:

    final Button btnAddMore = new Button(this);
    btnAddMore.setText(R.string.art_btn_moreIssues);
    exArticlesList = (ExpandableListView) this.findViewById(R.id.art_list_exlist);
    exArticlesList.addFooterView(btnAddMore);
    

提交回复
热议问题