Blurry
1.0.0
Blurry
는 Android
용 간편한 흐림 라이브러리입니다.
repositories {
mavenCentral()
}
dependencies {
compile ' jp.wasabeef:blurry:4.0.1 '
}
씌우다
상위 항목은 ViewGroup이어야 합니다.
Blurry . with (context).radius( 25 ).sampling( 2 ).onto(rootView)
안으로
// from View
Blurry . with (context).capture(view).into(imageView)
// from Bitmap
Blurry . with (context).from(bitmap).into(imageView)
흐림 옵션
Blurry . with ( context )
. radius ( 10 )
. sampling ( 8 )
. color ( Color . argb ( 66 , 255 , 255 , 0 ))
. async ()
. animate ( 500 )
. onto ( rootView );
비트맵을 직접 가져오기
// Sync
val bitmap = Blurry . with ( this )
.radius( 10 )
.sampling( 8 )
.capture(findViewById( R .id.right_bottom)).get()
imageView.setImageDrawable( BitmapDrawable (resources, bitmap))
// Async
Blurry . with ( this )
.radius( 25 )
.sampling( 4 )
.color( Color .argb( 66 , 255 , 255 , 0 ))
.capture(findViewById( R .id.left_bottom))
.getAsync {
imageView.setImageDrawable( BitmapDrawable (resources, it))
}
안드로이드 5.+(API 21)
후리야 다이치 (Wasabeef) - [email protected]
Copyright (C) 2020 Wasabeef
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.