From 800c631bd1f8fff3d58cfd23003ed0c90f19c58a Mon Sep 17 00:00:00 2001 From: yueban Date: Tue, 28 May 2019 16:52:26 +0800 Subject: [PATCH] fix crash on get blk_alpha with attribute --- blurkit/src/main/java/io/alterac/blurkit/BlurLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blurkit/src/main/java/io/alterac/blurkit/BlurLayout.java b/blurkit/src/main/java/io/alterac/blurkit/BlurLayout.java index 7d03c9e..7fbaee2 100644 --- a/blurkit/src/main/java/io/alterac/blurkit/BlurLayout.java +++ b/blurkit/src/main/java/io/alterac/blurkit/BlurLayout.java @@ -95,7 +95,7 @@ public BlurLayout(Context context, AttributeSet attrs) { mBlurRadius = a.getInteger(R.styleable.BlurLayout_blk_blurRadius, DEFAULT_BLUR_RADIUS); mFPS = a.getInteger(R.styleable.BlurLayout_blk_fps, DEFAULT_FPS); mCornerRadius = a.getDimension(R.styleable.BlurLayout_blk_cornerRadius, DEFAULT_CORNER_RADIUS); - mAlpha = a.getDimension(R.styleable.BlurLayout_blk_alpha, DEFAULT_ALPHA); + mAlpha = a.getFloat(R.styleable.BlurLayout_blk_alpha, DEFAULT_ALPHA); } finally { a.recycle(); }