본문 바로가기
[android] Tinting drawables [android] Tinting drawables http://andraskindler.com/blog/2015/tinting_drawables/ -Tinting drawable 은 현재의 theme 에 맞춘 drawable 을 만들 때 유용하게 사용할 수 있다.apk size 도 줄일 수 있는 장점이 있다. -v4 support library 에 DrawableCompat 이라는 class 가 있다.이 녀석은 원래 LOS 이상에서 가능한 tinting (색깔 입히기, 물들이기) 기능을 활용할 수 있게 한다. 그러나 이 녀석은 아직도 wrap() 라는 함수를 통해 wrap 해주어야 하는 단점이 있다.그래서 TintedBitmapDrawable 을 구현해서 사용하는 것이 추천된다. -TintedBitmap.. 2017. 9. 15.
[android] Circular Reveal 만들기 [android] Circular Reveal 만들기 http://frogermcs.github.io/InstaMaterial-concept-part-6-user-profile/ -Circular reveal 을 만드는 방법은 여러가지가 있다. -ViewAnimationUtils.createCircularReveal() 은 Render thread 통해 animation 되기 때문에 Lollipop 이전 단말에서는 사용할 수 없는 방법이다.하지만 Lollipop 이라면 가장 간단한 방법이다.[android] CircularRevealEffect Basic Simple Example -https://github.com/ozodrukh/CircularReveal 위의 링크는 Ginger 이상에서 사용할 수 .. 2017. 7. 14.
[android] 일반적이지 않은 사진(이미지) 모양 만들기 #2 [android] 일반적이지 않은 사진(이미지) 모양 만들기 #2 출처 : http://blog.stylingandroid.com/archives/2660 이전 글 : http://aroundck.tistory.com/2971 Shader 는 Canvas 에 그릴 때 fill style 을 정의할 때 사용되며, Paint 객체에 전달하여 사용된다. 이 방법은 BitmapShader 를 이용하며, round corner radius 를 bitmap 의 1/8 사이즈로 한다.그리고 Canvas.drawRoundRect 를 이용하여 기존 이미지 형태의 rounded rect 를 대체한다. public Bitmap processImage(Bitmap bitmap) { Bitmap bmp; bmp = Bitmap.. 2015. 4. 30.
반응형