Search in sources :

Example 1 with SunRefreshView

use of com.yalantis.phoenix.refresh_view.SunRefreshView in project Phoenix by Yalantis.

the class PullToRefreshView method setRefreshStyle.

public void setRefreshStyle(int type) {
    setRefreshing(false);
    switch(type) {
        case STYLE_SUN:
            mBaseRefreshView = new SunRefreshView(getContext(), this);
            break;
        default:
            throw new InvalidParameterException("Type does not exist");
    }
    mRefreshView.setImageDrawable(mBaseRefreshView);
}
Also used : InvalidParameterException(java.security.InvalidParameterException) SunRefreshView(com.yalantis.phoenix.refresh_view.SunRefreshView)

Aggregations

SunRefreshView (com.yalantis.phoenix.refresh_view.SunRefreshView)1 InvalidParameterException (java.security.InvalidParameterException)1