목록전체 글 (1484)
오늘도 공부
출처 : http://arabiannight.tistory.com/55 안드로이드/Android 부모의 속성을 동일 하게 가져 가자! 안드로이드 XML을 개발하면서 List나 뷰의 이벤트 발생에 따라 화살표(Arrow)버튼 이미지도 Press 처리 해야 할 경우가 많은데요. 이런 경우게 onTouchEvent로 터치 했을 경우에 Pressed 처리하거나 터치를 종료할 경우 Normal 처리 해주는 경우가 있었을 겁니다. 하지만 부모 뷰의 속성에 따라 Child뷰의 속성들이 이벤트를 받는 XML 속성이 있는데요. 이 속성을 쓰면 훨씬더 간결하고 편하게 코드를 작성할 수 있습니다. 그 속성의 이름은 바로 요놈 입니다. android:duplicateParentState="true" 보통 요즘의 화면 구성에는..
출처 : http://hmkcode.com/android-custom-listview-titles-icons-counter/ Android | Custom ListView with Titles, Icons & Counter You can customize the ListView by providing a new layout for the list items “rows”. The new layout can be more than just a single TextView. Here will see how to develop a custom ListView with items having leading icons “ImageView“, trailing counters “TextView” and some tex..
출처 : http://www.kmshack.kr/323 Android View와 관련된 오픈소스들이 많이 공개 되고 있다. 그래서 많이 쓰이고 유용한 오픈소스를 정리 해보았다. 아직 국내에서는 오픈소스가 인색한지 모두 외국에서 만든것들이다. 나도 View관련 오픈소스를 하나준비 하겠다고 준비중인데.. 준비중이기만 하다. 참고로, 잘 알려지고 검증된 오픈소스라도 코드를 하나하나씩 보고 어떻게 구현되어 있는지 꼭 살펴보고 썼으면 좋겠다. 그리고 이제 개발을 시작한지 얼마 안된 분들이라면 이런 오픈소스를 사용함으로 자기 실력을 죽일 수도 있으니 한번씩 구현해보는 것도 좋을듯 하다. 그리고 국내 개발 커뮤니티에 보면 자기가 개발할 것에 대해 오픈소스를 찾음으로써 개발해서 삽질 하기전에 찾아서 다행이다라는 글들을..
출처 : http://kahdev.wordpress.com/2008/09/13/making-a-custom-android-button-using-a-custom-view/ Creating a custom view is as simple as inheriting from the View class and overriding the methods that need to be overridden. In this example, a custom button is implemented in this way. The button shall feature a labelled image (i.e. an image with text underneath). 1 public class CustomImageButton ext..
출처 : http://javaexpert.tistory.com/179#comment9420256 기본적으로 SlidingDrawer 는 오른쪽에서 왼쪽으로 밖에 지원이 안되는가?? -- 왼쪽에서 밀면훨씬편한데.. ㅋㅋ 이것이 xml 코드 public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.subware); drawer = (SlidingDrawer)findViewById(R.id.slidingDrawer); drawer.setOnDrawerScrollListener(new Slid..
출처 : http://blog.naver.com/PostView.nhn?blogId=rosaria1113&logNo=107988257&parentCategoryNo=&categoryNo=76&viewDate=&isShowPopularPosts=false&from=postView
펌 : http://muzesong.tistory.com/38 안드로이드를 하다보면 액티비티가 계속 쌓이는 경우가 있다. 이 경우는 시스템 적으로 아무래도 부담이되고, 물론 눈에 보일정도로 그런다기보다 계속 그렇게 쌓다보면 뒤로가기를 한참을 눌러야 밖으로 빠져나가게 되는 불상사가 생긴다. 이럴 경우 현재 액티비티나 현재액티비티가 아닌 다른 액티비티를 종료시켜서 액티비티를 줄이는 방법이있는데, 우선 현재 액티비티를 죽이는 방법은 간단하다. 어떠한 작업을 완료하고 액티비티를 종료하기를 원한다면 작업 완료 다음줄에 finish(); 이것만 적어주면 된다. 이렇게 되면 저 함수를 만나는 즉시 현재 액티비티가 종료된다. 하지만 A 액티비티에서 B액티비티를 갔는데 A액티비티를 죽이고 싶다면 이렇게 하면된다. 우선 ..
출처 : http://www.kmshack.kr/249 mainActivity.java public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); intentMyService = new Intent(this,PersistentService.class); // 죽지않는 좀비 서비스 receiver = new RestartService(); // 리시버 등록 try{ IntentFilter mainFilter = new IntentFilter("com.jongbum.ServiceTest.ssss"); // xml에서 정의해도 됨 registerReceiver(..
출처 : https://github.com/johannilsson/android-pulltorefresh Pull To Refresh for Android This project aims to provide a reusable pull to refresh widget for Android. Repository at https://github.com/johannilsson/android-pulltorefresh. Usage Layout Activity // Set a listener to be invoked when the list should be refreshed. ((PullToRefreshListView) getListView()).setOnRefreshListener(new OnRefreshLis..
