I have a ListView activity that needs a footer to the list of items so that you can click it and it would load more items into the list. The list is backed my an SimpleAdapt
View footerView = getLayoutInflater().inflate(R.layout.search_footer,
mContentList, false);
LongButton mSearchMoreBtn = (LongButton) footerView
.findViewById(R.id.searchmore_btn);
mSearchMoreBtn.setText(R.string.search_moreapp);//the button to add
mSearchMoreBtn.setBackgroundResource(R.drawable.btn_long_selector);
mSearchMoreBtn.setOnClickListener(mSearchMoreBtnListener);
footerView.setOnClickListener(mLoadMoreAppsListener);
mContentList.addFooterView(footerView);
I have no idea that when I adding mSearchMoreBtn to ListView as footerView, it is wrong, instead, when I adding footerView to ListView, it just fine