Skip to content

Commit

Permalink
Disable Hardware Layers for now. Fixes #196
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Banes committed Jan 8, 2013
1 parent 8a71c60 commit 420b36a
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public abstract class PullToRefreshBase<T extends View> extends LinearLayout imp
// ===========================================================

static final boolean DEBUG = true;

static final boolean USE_HW_LAYERS = false;

static final String LOG_TAG = "PullToRefresh";

Expand Down Expand Up @@ -959,12 +961,15 @@ protected final void setHeaderScroll(final int value) {
}
}

/**
* Use a Hardware Layer on the Refreshable View if we've scrolled at
* all. We don't use them on the Header/Footer Views as they change
* often, which would negate any HW layer performance boost.
*/
ViewCompat.setLayerType(mRefreshableViewWrapper, value != 0 ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE);
if (USE_HW_LAYERS) {
/**
* Use a Hardware Layer on the Refreshable View if we've scrolled at
* all. We don't use them on the Header/Footer Views as they change
* often, which would negate any HW layer performance boost.
*/
ViewCompat.setLayerType(mRefreshableViewWrapper, value != 0 ? View.LAYER_TYPE_HARDWARE
: View.LAYER_TYPE_NONE);
}

switch (getPullToRefreshScrollDirection()) {
case VERTICAL:
Expand Down

0 comments on commit 420b36a

Please sign in to comment.