Skip to content

Commit

Permalink
Add support for additional android standard view constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
loopj committed Apr 15, 2011
1 parent 8b9f191 commit 45f74fe
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,22 @@ public class PullToRefreshListView extends ListView implements OnScrollListener
private int mRefreshOriginalTopPadding;
private int mLastMotionY;

public PullToRefreshListView(Context context) {
super(context);
init(context);
}

public PullToRefreshListView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}

public PullToRefreshListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(context);
}

private void init(Context context) {
// Load all of the animations we need in code rather than through XML
mFlipAnimation = new RotateAnimation(0, -180,
RotateAnimation.RELATIVE_TO_SELF, 0.5f,
Expand Down

0 comments on commit 45f74fe

Please sign in to comment.