diff --git a/library/src/se/emilsjolander/flipview/FlipView.java b/library/src/se/emilsjolander/flipview/FlipView.java index ac0a7ce..d6f2f7b 100644 --- a/library/src/se/emilsjolander/flipview/FlipView.java +++ b/library/src/se/emilsjolander/flipview/FlipView.java @@ -846,10 +846,12 @@ private void drawFlippingShadeShine(Canvas canvas) { * @param drawWithLayer */ private void setDrawWithLayer(View v, boolean drawWithLayer) { - if (v.getLayerType() != LAYER_TYPE_HARDWARE && drawWithLayer) { - v.setLayerType(LAYER_TYPE_HARDWARE, null); - } else if (v.getLayerType() != LAYER_TYPE_NONE && !drawWithLayer) { - v.setLayerType(LAYER_TYPE_NONE, null); + if (isHardwareAccelerated()) { + if (v.getLayerType() != LAYER_TYPE_HARDWARE && drawWithLayer) { + v.setLayerType(LAYER_TYPE_HARDWARE, null); + } else if (v.getLayerType() != LAYER_TYPE_NONE && !drawWithLayer) { + v.setLayerType(LAYER_TYPE_NONE, null); + } } }