Skip to content

Commit

Permalink
moved spinner in CommentsActivity to a more generic FilteredRecyclerV…
Browse files Browse the repository at this point in the history
…iew view which can be used in any fragment
  • Loading branch information
mzorz committed Feb 5, 2016
1 parent 2ee06c3 commit a5357b9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ public interface RefreshListener {
public void onRefreshStarted();
}

public SwipeToRefreshHelper(Activity activity, CustomSwipeRefreshLayout swipeRefreshLayout, RefreshListener listener) {
init(activity, swipeRefreshLayout, listener);
public SwipeToRefreshHelper(Context context, CustomSwipeRefreshLayout swipeRefreshLayout, RefreshListener listener) {
init(context, swipeRefreshLayout, listener);
}

public void init(Activity activity, CustomSwipeRefreshLayout swipeRefreshLayout, RefreshListener listener) {
public void init(Context context, CustomSwipeRefreshLayout swipeRefreshLayout, RefreshListener listener) {
mRefreshListener = listener;
mSwipeRefreshLayout = swipeRefreshLayout;
mSwipeRefreshLayout.setOnRefreshListener(this);
final TypedArray styleAttrs = obtainStyledAttrsFromThemeAttr(activity, R.attr.swipeToRefreshStyle,
final TypedArray styleAttrs = obtainStyledAttrsFromThemeAttr(context, R.attr.swipeToRefreshStyle,
R.styleable.RefreshIndicator);
int color = styleAttrs.getColor(R.styleable.RefreshIndicator_refreshIndicatorColor, activity.getResources()
int color = styleAttrs.getColor(R.styleable.RefreshIndicator_refreshIndicatorColor, context.getResources()
.getColor(android.R.color.holo_blue_dark));
mSwipeRefreshLayout.setColorSchemeColors(color, color, color, color);
}
Expand Down

0 comments on commit a5357b9

Please sign in to comment.