본문 바로가기
[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] View Separator 만드는 방법들 [android] View Separator 만드는 방법들 http://envyandroid.com/archives/1193/view-separators 방법 1. VIew 사이사이에 separator 역할을 하는 view 들을 직접 삽입한다. 방법 2. API Level 11 이상에서만 가능한 건데.. Layout 속성으로 showDividers 값을 준다. 방법 3. 가장 쉬운 방법으로써 ButtonBarStyle 을 사용하는 것이다. style="?android:buttonStyle" 을 주고 android:dividerPadding 값으로 divider 들의 padding 값도 조절할 수 있다. 11, 1dp, 1px, ?android:bubttonBarStyle, Android, android:.. 2015. 4. 12.
[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.
[Effective Java] private 생성자를 사용해서 인스턴스 생성을 못하게 하자. private 생성자를 사용해서 인스턴스 생성을 못하게 하자. - static 메소드와 static 필드만을 모아 놓은 클래스를 만들 경우 private 생성자를 사용해서 인스턴스 생성을 못하게 하자. - 명시적으로 지정한 생성자가 없을 때는 컴파일러가 디폴트 생성자 ( default constructor ) 를 생성한다. 이는 javadoc 프로그램으로 생성하는 API 문서에도 나타나므로 인스턴스 생성이 가능한 클래스로 오인될 수 있다. public class UnilityClass{ private UtilityClass(){ throw new AssertError(); } ... } - 이 방법은 sub class 를 가질 수 없다는 단점이 있지만, Utility 함수들은 대부분 상속을 위해 설계되지.. 2015. 4. 5.
No repository found error in Installing ADT in eclipse I just encountered following error message in the Eclipse "" No repository found error in Installing ADT in eclipse "". I removed the http://dl-ssl.google.com/android/eclipse/ site and then re-added it, then everything downloaded fine. Eclipse 에서 "" No repository found error in Installing ADT in eclipse "" 와 같은 에러를 마딱뜨렸다. 다음 ADT 를 다운받는 주소를 삭제했다가 다시 add 하니 제대로 다운로드를 시작한다.http://dl-ssl.google.com/.. 2015. 3. 28.
git commit message 수정 방법 git commit message 수정 방법 바로 직전에 Commit 한 녀석(HEAD) 의 message 를 수정할 때 > git commit --amend 나오는 Editor 화면에서 Commit message 를 수정한 후 저장하면 된다. HEAD 이전의 커밋 메시지를 수정하고자 하면 ( 예를 들어 2번째 전까지 수정하고자 하면 ) > git rebase -i HEAD~2 나오는 Editor 화면에서 변경을 원하는 커밋분의 pick 을 edit 로 수정하고, message 를 바꾼 후 저장한다. 아래 명령어들을 edit 로 수정한 커밋 개수만큼 수행한다. > git commit --amend > git rebase --continue 도중에 취소하고 싶다면 아래 명령을 수행한다. > git reba.. 2015. 3. 22.
Unity 5.0 출시 && 전면 무료화 선언!! Unity 5.0 출시 && 전면 무료화 선언!! 출처 : http://wlhermit.blog.me/220289639766 - Unity 5 엔진의 특징은 아래 링크에서 볼 수 있다. http://unity3d.com/kr/unity/engine-features - Unity 5.0 은 Personal Edition, Professional Edition 2가지 형태로 제공. Personal Edition 은 완전 무료. 스플래쉬 화면( Personal Edition 이라는 게 splash 로 보임 ) 제거를 제외한 모든 기능을 포함( 이전 버전에서는 다른 제약이 있었음 ) 하며, 완전 무료이다. 단!! Personal Edition 으로 1억 이상의 매출을 올린다면, Professional Editi.. 2015. 3. 22.
How to implement a Floating Activity in an Android App. How to implement a Floating Activity in an Android App. 출처 : http://cases.azoft.com/android-tutorial-floating-activity/ 만들고자 하는것. - Floating Activity ( Transparent ) - 단말의 orientation 에 상관없이 화면의 약 2/3 를 차지하며, center 에 위치하는 것. 만드는 과정 - Activity size 와 location 계산하기.- Activity 를 transparent 하게 만들기.- Background 가 touch 를 받지 않도록 하기. 1. Activity size 계산하기 ActionBar 를 사용하는 경우에 ActionBar 는 항상 동일한 위치에 존.. 2015. 3. 8.
android language code ( extension of values folders ) Country Name Introduced Version. English, US (en_US) 1.1German, Germany (de_DE) 1.1Chinese, PRC (zh_CN) 1.5Chinese, Taiwan (zh_TW) 1.5Czech, Czech Republic (cs_CZ) 1.5Dutch, Belgium (nl_BE) 1.5Dutch, Netherlands (nl_NL) 1.5English, Australia (en_AU) 1.5English, Britain (en_GB) 1.5English, Canada (en_CA) 1.5English, New Zealand (en_NZ) 1.5English, Singapore(en_SG) 1.5French, Belgium (fr_BE) 1.5Fr.. 2015. 2. 27.
반응형