Android Open Source - PulltorefreshListView List Bottom View






From Project

Back to project page PulltorefreshListView.

License

The source code is released under:

Apache License

If you think the Android project PulltorefreshListView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package yaochangwei.pulltorefreshlistview.widget;
/*from  w  w w  .  j a  va2 s  .  c o  m*/
import android.content.Context;
import android.view.View;

public class ListBottomView extends ListHeaderView {

  public ListBottomView(Context context, RefreshableListView list) {
    super(context, list);
  }

  @Override
  protected void onLayout(boolean changed, int l, int t, int r, int b) {
    final View childView = getChildView();
    if (childView == null) {
      return;
    }

    final int childViewWidth = childView.getMeasuredWidth();
    final int childViewHeight = childView.getMeasuredHeight();
    childView.layout(0, 0, childViewWidth, childViewHeight);
  }
  
  public void setBottomHeight(int height){
    setHeaderHeight(height);
    mListView.setSelection(mListView.getAdapter().getCount() - 1);
  }

  @Override
  public void setHeaderHeight(int height) {
    super.setHeaderHeight(height);
  }

}




Java Source Code List

yaochangwei.pulltorefreshlistview.TestActivity.java
yaochangwei.pulltorefreshlistview.widget.ListBottomView.java
yaochangwei.pulltorefreshlistview.widget.ListHeaderView.java
yaochangwei.pulltorefreshlistview.widget.MotionEventCompatEclair.java
yaochangwei.pulltorefreshlistview.widget.MotionEventCompat.java
yaochangwei.pulltorefreshlistview.widget.RefreshableListView.java
yaochangwei.pulltorefreshlistview.widget.extend.PullToRefreshListView.java