From a5357b9dda5276b357ed58d8720f8d82c9582760 Mon Sep 17 00:00:00 2001 From: Mario Zorz Date: Fri, 5 Feb 2016 15:45:17 -0300 Subject: [PATCH] moved spinner in CommentsActivity to a more generic FilteredRecyclerView view which can be used in any fragment --- .../android/util/helpers/SwipeToRefreshHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/SwipeToRefreshHelper.java b/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/SwipeToRefreshHelper.java index b6eb6c6c395d..e6f4bf323285 100644 --- a/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/SwipeToRefreshHelper.java +++ b/WordPressUtils/src/main/java/org/wordpress/android/util/helpers/SwipeToRefreshHelper.java @@ -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); }