diff --git a/library-core/src/main/java/it/gmariotti/cardslib/library/view/CardViewNative.java b/library-core/src/main/java/it/gmariotti/cardslib/library/view/CardViewNative.java index 5c43360d..25a05e45 100644 --- a/library-core/src/main/java/it/gmariotti/cardslib/library/view/CardViewNative.java +++ b/library-core/src/main/java/it/gmariotti/cardslib/library/view/CardViewNative.java @@ -30,7 +30,6 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.support.annotation.LayoutRes; -import android.support.v4.view.ViewCompat; import android.util.AttributeSet; import android.util.Log; import android.view.LayoutInflater; @@ -291,6 +290,7 @@ protected void initView() { } + @TargetApi(Build.VERSION_CODES.LOLLIPOP) @Override public void drawableHotspotChanged(float x, float y) { @@ -421,10 +421,7 @@ protected void retrieveLayoutIDs(){ */ protected void setupShadowView() { if (mCard != null && mCard.getCardElevation() != null) { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) - ViewCompat.setElevation(this,mCard.getCardElevation()); - else - ViewCompat.setElevation(this,mCard.getCardElevation()); + this.setCardElevation(mCard.getCardElevation()); } }