본문 바로가기

sample

[Android] AlarmManager를 이용한 Schedule 관리 우선, 미리 말씀을 드리겠습니다. 제가 테스트 해 본 결과, AlarmManager는 최소 5초 이상은 지정을 해야 합니다.구글 에서는 10초 이상을 권장 하더라구요.1초마다 지정을 할 경우는 5초마다 불러오게 됩니다. 그리고 도즈 모드에서는 적어도 10분 걸릴 수도 있다고 합니다. 그럼 만들어본 로직은 AlarmManager를 Repeat를 쓰지 않고 아래 형태로 호출하도록 하였습니다. private void startAlram(Context context, PendingIntent pendingIntent, int delay) { // AlarmManager 호출 AlarmManager manager = (AlarmManager) context.getSystemService(Context.ALARM_.. 더보기
[Android] View Background를 Rounded corner 형태로 반영 RecyclerView나 ListView와 같은 여러 View가 묶어서 표현해야 하는 View에서 Corner 부분만 라운드를 시키고자 할때,가장 쉽게 생각할 수 있는 부분이 Background에 Rounded된 이미지를 넣는 것으로 어느정도 해결이 된다. 하지만, 이 외에도 한가지 더 좋은 방법이 있다.Rounded Corner 형태의 Drawable을 xml로 그리는 것이다.그게 아래 소스이다. 위 속성에서 corners 라는 값을 가지고 Corner에 Rounding 정도를 체크 할 수 있다. ## 위 형태로도 문제없이 동작이 가능 하면 좋지만, RecyclerView 나 ListView 등에서 row에 있는 View가 튀어 나오는 경우가 있습니다. 그럴 경우 아래와 같이 clip 을 한번 해줘보세.. 더보기
[Android][스크랩] How To Make Material Design Navigation Drawer With Header View http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html One of the most evident changes when the material design came out and I got my hands on was the new Navigation Drawer, The Hamburger toggle icon animation seemed very beautiful, The Overlapping drawer on status bar also seemed nice effect and so we are going to learn how to make a Navigation Drawer in this tut.. 더보기
[ Object-c ] 클래스 다루기 원래 안드로이드 개발자인 나.. 아마 프로그램 이해방식이 자바쪽으로 많이 되어 있을 것이다. 이해바람. 참고로 전.. 윈도우에서 공부중이란...^^;; @interface : 클래스를 선언 시켜주는 부분이다. @implementation : 선언 되어진 변수나 메소드를 가지고 실제 코드를 작성. 자바와 비슷하지만, 두 부류로 나누어져 있다는 게 큰 특징 같다. 한번 implemetation만 선언해도 되지 않을까 했는데.. 역시나 오류가 뜨는군..^^;; @interface 클래스 이름: 부모 클래스 { 변수 선언; } 메소드 선언; @end @implementaion 클래스 이름 실제 코드 @end 샘플 소스 #import // 클래스 형태를 잡아주는 선언 부분 @interface Fraction: N.. 더보기