목록Android (496)
올해는 머신러닝이다.
출처 : http://ismydream.tistory.com/136 안드로이드 Loader 활용하기 Loader- 안드로이드 3.0 에서 소개된 Loader 를 사용하면 액티비티와 프래그먼트에서의 비동기 데이터 로딩을 쉽게 처리할 수 있습니다. 특징- 모든 액티비티와 프래그먼트에서 사용할 수 있습니다.- 어플리케이션 UI를 Blocking 하지 않도록 비동기 데이터 로딩을 제공합니다.- 데이터를 모니터 하기 때문에 데이터가 변경되었을때 변경사항을 확인할 수 있습니다. APILoaderManager - LoaderManager는 액티비티, 프래그먼트 와 1:1 의 관계를 갖습니다. 액티비티 하나당 하나의 LoaderManger 가 존재하는 셈이죠그리고 하나의 LoaderManager 는 여러개의 Loade..
https://github.com/grantland/android-autofittextview
출처 : http://ankri.de/autoscale-textview/I was in need of a TextView that has a fixed with but dynamic content, so I needed the content to automatically scale.The AutoScaleTextView takes the android:textSize value and uses it as the preferred text size. You can also set the minimum text size. The default for the minimum text size is 10dp. TheAutoScaleTextView now tries to take the maximum value b..
android-formatting.xml android.importorder 20개 정도 규칙이 있으며 출처는 source.android.com에서 좀 더 자세한 내용을 볼 수 있다. build된 sdk에는 없지만 sdk 소스를 다운받으면 이클립스용 코딩 포맷과 import순서가 정보가 적힌 xml파일도 같이 받을 수 있는데, 이 글에 첨부했다. android-formatting.xml은 "Window › Preferences › Java › Code Style > Formatter 에 import하고,android.importorder "Organize Imports에 import하면Shift+command+F로 자동포멧정리 기능을 안드로이드에 맞게 사용할 수 있다. Java Language Rules..
리스트뷰 밑의 내용 스크롤시 애니메이션 붙이는 방법 https://github.com/cuub/sugared-list-animations https://github.com/nhaarman/ListViewAnimations 오픈소스 사용하시면 됩니다.
http://blog.naver.com/PostView.nhn?blogId=iflowerpot&logNo=80121408847&categoryNo=13&parentCategoryNo=0&viewDate=¤tPage=3&postListTopCurrentPage=&userTopListOpen=true&userTopListCount=5&userTopListManageOpen=false&userTopListCurrentPage=3
출처 : https://medium.com/marojuns-android/kitkat-4-4-%EC%97%90%EC%84%9C-%EB%A7%9E%EB%8B%A5%EB%9C%A8%EB%A6%B0-%EC%9D%B4%EC%8A%88-%EB%B0%8F-%ED%95%B4%EA%B2%B0-1ecb94c24694
http://hns17.tistory.com/entry/App-개발-잠금화면-HomeKey-Control-Problem
100% — FF 95% — F2 90% — E6 85% — D9 80% — CC 75% — BF 70% — B3 65% — A6 60% — 99 55% — 8C 50% — 80 45% — 73 40% — 66 35% — 59 30% — 4D 25% — 40 20% — 33 15% — 26 10% — 1A 5% — 0D 0% — 00
출처 : http://stackoverflow.com/questions/16163215/android-styling-seek-bar I would extract drawables and xml from Android source code and change its color to red. Here is example how I completed this for mdpi drawables: Custom red_scrubber_control.xml: Custom: red_scrubber_progress.xml Then copy required drawables from Android source code, I took them here: https://github.com/android/platform_fra..
출처 : http://stackoverflow.com/questions/12411060/get-listview-height-after-setadapter ListView lv_marca; lv_marca.setAdapter(adapter_marca); int list_height = getListViewHeight(lv_marca); private int getListViewHeight(ListView list) { ListAdapter adapter = list.getAdapter(); int listviewHeight = 0; list.measure(MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED), Measur..
출처 : 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..
출처 : http://www.kmshack.kr/346 얼마전 ListView 포퍼먼스 팁에 관한 블로그 포스팅을 한적이 있다. Adapter에서 View의 재활용과 함께 ViewHolder Pattern으로 findViewById를 View생성 시점에 setTag()를 하여 재활용에 대해 언급 했다. 이 방법은 각 ListView의 ViewItem별로 각각의 ViewHolder를 가지고 있어야 한다. ListView의 아이템별로 서로 다른 디자인이 필요하기에 View의 종류가 달라 질 수 밖에 없기때문에 ViewHolder도 각각 존재 할 수 밖에 없다. 이렇게 static하게 ViewHolder을 가지고 있는것 보다 유연하게 ViewHolder를 생성 할 수 있는 코드를 생성하는 방법에 대해서 알아보..
출처 : http://www.techrepublic.com/blog/software-engineer/create-a-transparent-progress-dialog-on-android/ A game development hobby project inspired this app developer to figure out a way to create a transparent progress dialog that animates an image. He describes how to do it. Over the last year I've been working hard in my spare time writing a multiplayer game for mobile devices. It's slow going..
[안드로이드] Event 처리 메커니즘 출처 : http://ecogeo.tistory.com/251 안드로이드의 이벤트 처리 과정에 대한 글(http://blog.naver.com/osk1004?Redirect=Log&logNo=50069078782 )을 참조하여 나름대로 분석하여 메모한 결과를 적어본다. 개략적인 이벤트 처리 과정 액티비티 생성시 액티비티의 윈도우를 WindowManagerService에 등록해둠 이벤트 발생시 네이티브 라이브러리(EventHub)를 통해 이벤트 읽음 이벤트 큐(KeyInputQueue)에 이벤트 쌓임 이벤트 디스패치 쓰레드(InputDispatcherThread)는 이벤트큐에서 이벤트를 꺼내어 WindowManagerService의 디스패치 메소드 호출 WindowM..
출처 : http://www.coremodeling.com/android/tutorial/AppWidget/AppWidget.html App Widget 작성자 : 고덕한(deokhan.koh@gmail.com) 소속 : 코아모델링(www.coremodeling.com) 작성일자 : 2011년 9월 22일 Android 홈페이지에 있는 App Widget 문서를 번역하면서 AppWidget 에 대한 개념과 개발하는 방법을 익히도록 합니다. URL 은 http://developer.android.com/guide/topics/appwidgets/index.html 클릭하면 됩니다. App Widget 은 Home Screen 에 보여지는 것과 같이 다른 Application 에 Embedded 될 수 있고..
http://blog.naver.com/PostView.nhn?blogId=huewu&logNo=110099015747&parentCategoryNo=&categoryNo=&viewDate=&isShowPopularPosts=false&from=postView
http://blog.daum.net/hopefullife/226
- Eclipse 자주 쓰는 단축키 - - Eclipse 자주 쓰는 단축키 - ----- 실행 ----- Ctrl + F11 : 바로 전에 실행했던 클래스 실행 ----- 소스 네비게이션 ----- Ctrl + 마우스커서(혹은 F3) : 클래스나 메소드 혹은 멤버를 상세하게 검색하고자 할때 Alt + Left, Alt + Right : 이후, 이전 Ctrl + O : 해당 소스의 메소드 리스트를 확인하려 할때 F4 : 클래스명을 선택하고 누르면 해당 클래스의 Hierarchy 를 볼 수 있다. Alt + ) : 이전(다음) 작업 화면 ----- 문자열 찾기 ----- Ctrl + K : 찾고자 하는 문자열을 블럭으로 설정한 후 키를 누른다. Ctrl + Shift + K : 역으로 찾고자 하는 문자열을 ..