@Override
public
void
onScroll(AbsListView view,
int
firstVisibleItem,
int
visibleItemCount,
int
totalItemCount) {
int
count = totalItemCount - visibleItemCount;
if
(firstVisibleItem >= count && totalItemCount !=
0
&& mLockListView ==
false
) {
if
(Estimate.mHasMoreList) {
final
View footerView = mInflater.inflate(R.layout.footer_btn,
null
);
listView_request0.addFooterView(footerView);
mLockListView =
true
;
final
int
start = Estimate.mLastEnd +
1
;
final
int
end = start + LIST_PAGE_ITEM_LENGTH;;
runOnUiThread(
new
Runnable() {
@Override
public
void
run() {
}
});
estimate_btn01 = (Button)footerView.findViewById(R.id.estimate_btn01);
estimate_btn01.setOnClickListener(
new
OnClickListener() {
@Override
public
void
onClick(View v) {
new
Estimate_List(myada_zero, start, end,
new
ReceiveThreeOneListener() {
@Override
public
void
onReceived() {
mLockListView =
false
;
listView_request0.removeFooterView(footerView);
}
}).execute();
}
});
}
}
}