본문 바로가기
[android] 원형 progress view 그리기 [android] 원형 progress view 그리기 http://frogermcs.github.io/InstaMaterial-concept-part-9-photo-publishing/ -public class SendingProgressView extends View { public static final int STATE_NOT_STARTED = 0; public static final int STATE_PROGRESS_STARTED = 1; public static final int STATE_DONE_STARTED = 2; public static final int STATE_FINISHED = 3; private static final int PROGRESS_STROKE_SIZE = 10; p.. 2017. 7. 15.
[android] Circular Bitmap 만들기 ( 동그란 프로필 사진 ) [android] Circular Bitmap 만들기 ( 동그란 프로필 사진 ) http://frogermcs.github.io/InstaMaterial-concept-part-6-user-profile/ -public class CircleTransformation implements Transformation { private static final int STROKE_WIDTH = 6; @Override public Bitmap transform(Bitmap source) { int size = Math.min(source.getWidth(), source.getHeight()); int x = (source.getWidth() - size) / 2; int y = (source.getHeight(.. 2017. 7. 13.
[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.
[android] 일반적이지 않은 사진(이미지) 모양 만들기 #1 - 모서리가 둥근 사각형 일반적이지 않은 사진(이미지) 모양 만들기 #1 - 모서리가 둥근 사각형 출처 : http://blog.stylingandroid.com/archives/2656 2가지 이미지를 합성해, 사각형의 이미지를 다른 모양으로 바꿀 수 있다.이번에 알아볼 것은 모서리가 둥근 사각형을 이용하여, 사각형 이미지를 둥근 사각형 모양으로 masking 하는 것이다. public Bitmap combineImages(Bitmap bgd, Bitmap fg) { Bitmap bmp; int width = bgd.getWidth() > fg.getWidth() ? bgd.getWidth() : fg.getWidth(); int height = bgd.getHeight() > fg.getHeight() ? bgd.getHei.. 2015. 4. 11.
[android] What's new in android Kitkat android, what is new in android Kitkat. 메모리 low ram device 인지 확인. boolean lowRam = ActivityManger.isLowRamDevice(); 앱의 메모리 사용을 한눈에 볼 수 있다. adb shell dumpsys procstats Process Stats 가 Setting 에 추가되었다. (단말)이것으로 메모리 사용량을 쉽게 볼 수 있다. 디자인 가이드 변경 Full-screen Immersive mode : status bar 와 software key 까지 제거. DecorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_IMMERSIVE or View.SYSTEM_UI_FLAG_IMMERSIVE_.. 2014. 1. 25.
반응형