목록Android (496)
오늘도 공부
출처 : http://stackoverflow.com/questions/2646028/android-horizontalscrollview-within-scrollview-touch-handling public class CustomScrollView extends ScrollView { private GestureDetector gestureDetector; View.OnTouchListener gestureListener; public CustomScrollView(Context context, AttributeSet attrs) { super(context, attrs); gestureDetector = new GestureDetector(new YScrollDetector()); setFadingE..
안드로이드 프로그래밍에서 중요한 개념 'Intent'보고있는 책보다도 잘 정리를 해 놓았다.....[원문] http://gtko.springnote.com/pages/5254593?edit=1인텐트를 통한 액티비티를 명시적으로 시작하는 방법, 암시적인 인텐트로 데이터의 한 부분에 대해 수행되는 액션을 요청하는 방법, 안드로이드가 그 요청을 서비스할 수 있는 애플리케이션 콤포넌트를 결정하도록 하는 방법을 설명한다.브로드캐스트 인텐트는 시스템 전역에 이벤트를 알린다. 즉, 브로드캐스트로 전송하고 브로드캐스트 수신자로 이를 받아 처리한다.어댑터는 데이터 소스와 프리젠테이션(view 들)과 연결하는 방법. 인텐트 소개어 떤 액션이 수행되는데 특정 데이터의 특정 부분을 가지고 수행하라는 선언으로 메시지를 전달하는..
웹뷰 키보드 위치조절 1.webview 밖에 scrollview 넣고 2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
The core functions shown below are available by default. Date & Time functions and aggregate functions are documented separately. An application may define additional functions written in C and added to the database engine using the sqlite3_create_function() API. abs(X) The abs(X) function returns the absolute value of the numeric argument X. Abs(X) returns NULL if X is NULL. Abs(X) return 0.0 i..
출처:http://blog.naver.com/PostView.nhn?blogId=ezmo01&logNo=110093890027&viewDate=¤tPage=1&listtype=0&userTopListOpen=false&userTopListCount=5&userTopListManageOpen=false&userTopListCurrentPage=undefined Custom Android Button Style and ThemePosted by Tonio | Filed under Tutorial In this tutorial, we’ll see how it’s possible to create a custom button style for an Android application by using ..
출처 : http://blog.naver.com/PostView.nhn?blogId=ezmo01&logNo=110093886802 정말 이정도 되는예제 아니면 올리지 말았으면 좋겠다. 쓰레기같은 소스들때문에 허비한 시간이 아깝다. First, create an XML layout, name it popup_layout.xml and in the res/layout/ folder: Here I have created a linear layout and put three buttons inside. So that the popup is visible I have made the background white. Now to the code. You probably already have a class wher..
출처 : http://blog.naver.com/PostView.nhn?blogId=huewu&logNo=110095622035&parentCategoryNo=18&viewDate=¤tPage=1&listtype=0 Android Traceview War Story 원문: http://android-developers.blogspot.com/2010/10/traceview-war-story.html [이 포스트는 Tim Bray 에 의해 작성되었습니다.] Tim Bray 는 안드로이드 개발자 블로그의 운영자로, 실재 안드로이드 개발팀의 여러 엔지니어가 작성한 내용을 바탕으로 블로그 포스팅을 해왔습니다만, 오랜만에 자신이 직접 작성한, Trace View 사용법에 관한 블로그 포스트를 업데이트 ..
http://www.slideshare.net/motodev/designing-apps-for-motorla-xoom-tablet
출처 : http://blog.naver.com/PostView.nhn?blogId=huewu&logNo=110119643374&parentCategoryNo=18&viewDate=¤tPage=1&listtype=0 Optimizing Apps for Android 3.0 원문: http://developer.android.com/guide/practices/optimizing-for-3.0.html 간만에 Dev Guide 문서를 번역해 보았습니다. 와... 내용이 길군요. 본 문을 두 개의 포스트로 나누고, 중복된 부분과 그다지 필요없다고 여겨지는 부분은 임의로 건너 띈 만큼, 원문을 참고하시면 좋겠네요. 안드로이드 3.0 허니콤은 어플리케이션 사용자 경험을 향상 시킬 수 있는, 여러가지 ..
잘안쓰지만 언젠가는 사용할일이 있겠지 싶은 물건. 주의할점이라고 하면 RadioGroup , RadioButton은 직계 부모 자식 간이어야 합니다. 먼저 그룹값을 가져온뒤 RadioGroup sexGroup = (RadioGroup) findViewById(R.id.sex); 그중에 선택퇸 라디오버튼을 다시한번 가져와서 RadioButton sex = (RadioButton) findViewById(sexGroup.getCheckedRadioButtonId()); 그것의 라벨내용을 사용합니다. sex.getText().toString();
물론 플랫폼에서 res 에 보면 다 볼수 있지만 귀찮거나 급할때 유용할 것 같다. http://www.screaming-penguin.com/info/android_drawables/android_drawables.html
출처 : http://blog.naver.com/david_shkim?Redirect=Log&logNo=50112464359 2011/05/30 04:42 http://blog.naver.com/david_shkim/50112464359 Android Serial(COM)Port 사용 하기 ---- [easop에서 가져왔습니다.] 1) Serial Program 받기 http://code.google.com/p/android-serialport-api/ Serial Port 관련 정보을 얻을 수 있습니다. JNI로 개발 형태로 되어 있습니다. Source는 http://android-serialport-api.googlecode.com/svn/trunk/android-serialport-api/ 에서 하..
R.styleable xml을 사용하다보면 android:layout_width , android:layout_height 등 android: 로 정의된 각 속성을 정의하게 되어있다. 나만의 레이아웃이나 뷰를 커스텀하게 사용하고자 하는경우 추가로 요구되는 값들이 생길텐데 이러한 값을 xml에서 입력하고자 할때 어케 할까? 예제는 TextButton 에 대한 포스팅에 잘 나와있다. 이번 포스팅은 커스텀 styleable에 대한 내용만 정리해 본다~ 1. 나만의 styleable 을 정의하기 해당 내용을 정의할 xml 파일을 만든다. ( my_layout_styleable.xml ) 요렇게하면 MyLayoutAttribete 라는 이름으로 3개의 값을 가지고 있는 styleable이 생겨난다. R.java ..
출처 : http://www.androidpub.com/android_dev_info/636981 개인적으로 작성한 Post가 어느정도 모여서 글을 올려봅니다. 안드로이드 개인 개발자 분들은 주말에도 일하시니까 ^^ 도움이 되시길 바래요. (저는 개발자라서 주말에는 쳐다도 안보겠죠 ㅎㅎ;) 좋은 주말 보내시구요 질문사항이 있으시면 포스트에 남겨주세요 !~ 주말에 답변할수도 Recent Posts [Day22] Service와 Alarm으로 실행되는 Androday FakeCall App 소스 [Day21] Service와 Broadcast 로 실행되는 Androday pedometer App 소스 [Day20] Preference 사용하여 스마트폰 정보 저장 소스 [Day19] Android Iphone..
출처 : http://cafe.naver.com/embeddedcrazyboys.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=9766& 13.안드로이드 블루투스 BlueTooth http://junho85.springnote.com/pages/6481569 목차 안드로이드 블루투스 BlueTooth 블루투스 다중 연결 안드로이드 블루투스 게임 UUID - Universally unique identifier 참고 안드로이드 블루투스 BlueTooth#블루투스#http://developer.android.com/reference/android/bluetooth/package-descr.html http://developer.android.com/reference/andr..
[Android] 갤럭시탭을 위해 레이아웃 맞추기 Android / 개발 2010/12/28 14:47 http://blog.naver.com/notinoti/80121268628 어플 개발을 하다보면 갤럭시S기준으로 만들게 되고 나중에 갤럭시 탭에서도 실행해 보았는데 화면 레이아웃이 조금씩 어긋나는 경우가 있습니다. 그럴때 다음과 같이 바꾸어서 해보면 어느정도 잡힐것입니다^_^ 1. manifest 파일에 을 추가합니다. (버전 7이상 권장) 그렇지 않으면 화면 가운데로 몰리는 현상이 발생해버리기 때문에 추가해야만 화면크기에 맞게 꽉 차서 나옵니다. 2. http://blog.naver.com/notinoti/80118619288 위에서 말한 내용처럼 모든 단위는 dp(간격, 크기), sp(폰트 사이즈..
출처 : http://tjandroid.blogspot.com/2011/06/adb.html usb 악세서리를 개발하게 되면 폰이 악세서리와 usb 로 연결 되어 있기 때문에 디버깅 하기가 여간 힘든게 아니다. 만약 PC 와 안드로이드 폰이 같은 네트워크 안에 있다면 예를 들어 같은 무선 공유기에 접속해 있다면 adb 를 usb 연결 없이 네트워크로 사용할 수 있다. 참조: http://developer.android.com/guide/topics/usb/index.html 의 Debugging considerations 부분 일반적인 방법 1. PC 와 폰 모두 같은 공유기에 접속한다. 2. PC 와 폰을 usb 로 연결한다. 3. PC 의 terminal 창을 열고 adb 명령을 다음과 같이 수행한다..
출처 : http://blog.naver.com/mujjingun/60144443786 1. 이클립스 없이 안드로이드 개발환경 구축하기1 ( JDK 설치, 안드로이드 SDK 설치, 에뮬레이터 실행 ) http://www.tipssoft.com/bulletin/tb.php/FAQ/902 2. 이클립스 없이 안드로이드 개발환경 구축하기2 ( 프로젝트 생성, 컴파일, 실행 ) http://www.tipssoft.com/bulletin/tb.php/FAQ/903 2-1 프로젝트 환경 파일 재구성하기 - Update Project http://www.tipssoft.com/bulletin/tb.php/FAQ/977 3. 안드로이드 프로그래밍 시작하기 http://www.tipssoft.com/bulletin/tb..
출처 : http://whitet8899.egloos.com/1322431 ADB (Android Debug Bridge) ADB의 구성 client : development machine에서 동작. shell에서 client를 invocation해서 command 실행 가능. ADT, DDMS도 client server : development machine의 background process이며, client와 daemon 사이에서의 communication을 관리 daemon : 각각의 device에서 동작하는 background process client를 시작하면, ADB server가 실행중인지 확인해서 실행중이지 않으면 server를 시작시킨다. server가 시작되면 TCP의 5037 po..
http://blog.naver.com/marine694?Redirect=Log&logNo=110106773623
출처 : http://codemuri.tistory.com/693 일반 개발자들은 주로 USB 를 이용하여 adb 를 사용합니다. 하지만 TCP 를 이용하여 adb 를 이용한 디버깅을 해본 사람들은 많지 않을 것입니다. 그도 그럴 것이 Rooting 또는 Engineering 빌드 버전이 아니면 TCP 설정이 적용되지가 않기 때문에 실 장치를 가지고 테스트를 해보기가 쉽지 않겠죠. 이 글을 읽고 계신 분들은 Rooting 폰 또는 Engineering 빌드 버전의 장치를 가지고 있다고 가정하겠습니다. TCP 를 이용하여 디버깅을 하면 USB 를 연결하지 않아도 adb 명령을 이용하여 app 을 설치하거나, logcat 의 로그를 모으는 등의 USB 와 연결된 것과 동일한 모든 adb 기능을 사용할 수 있..
SAMSUNG, LG, Smart Phone Android Open Source 삼성 안드로이드폰 소스 입니다. http://opensource.samsung.com/reception/reception_main.do?method=reception_list&menu_item=mobile LG 안드로이드 소스 입니다. http://opensource.lge.com 옵티머스 큐는 LU2300입니다
출처 : http://www.androidpub.com/index.php?mid=android_dev_info&search_target=title_content&search_keyword=%EB%A9%94%EB%89%B4&document_srl=1577289 안드로이드에 기본 내장되어 있는 QuickContactBadge 은 주소록에 한정해서 사용이 가능한듯합니다. http://developer.android.com/reference/android/widget/QuickContactBadge.html 검색해 보니까 같은 방식의 UI를 아무곳에나 적용기 가능한 소스를 공개한 사람이 있더군요. http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-..
Intent intent = new Intent(); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setAction(android.content.Intent.ACTION_VIEW); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); if (file.getName().endsWith(".pdf")){ intent.setDataAndType(Uri.fromFile(file), "application/pdf"); }else if (file.getName().endsWith(".hwp")){ intent.setDataAndType(Uri.fromFile(file), "application/hwp"); } try{ star..
안녕하세요~ 이번에 안드로이드에 대해 독학으로 공부하고 있는 학생입니다. 기본 지식이 많이 없는 편이라 이렇게 질문을 올리게 되었습니다. 귀찮더라두 끝까지 봐주시고 저에게 좋은 스승이 되어주세요 질문은 가속도 센서를 이용해서 만보기를 만들어 볼라고 하는데요 여차여차 소스를 구하게 되었습니다. 그래서 이것을 토대로 공부를 하고 싶어하는데요 소스들이 무엇을 의미하는지 몰라서 이렇게 질문을 하게 되었습니다 스승님들 저에게 가르침을 주세요~ 자세한 설명 부탁드리겠습니다!! (__)꾸벅! [MainActivity.java] package com.androday.test; import! android.app.Activity; import! android.content.BroadcastReceiver; import!..
출처 : http://www.mokasocial.com/2011/02/create-a-custom-styled-ui-slider-seekbar-in-android/ Create a Custom-Styled UI Slider (SeekBar) in Android By Koa Metter On February 17, 2011 In Android Development, Design, Tutorials With 4 Comments Permalink An Android slider (or a SeekBar as it’s called in the Android world) is a pretty slick UI tool which we recently used in our Call Your Folks! app as ..
출처 : http://www.androidside.com/bbs/board.php?bo_table=B52&wr_id=7278 아래 싸이트를 보고 이미지만 편집해서 해봤는데요 nine-patch이미지 만드는게 쉽지 않네요. 리소스를 잘 만들지 못해서 깔끔하지가 않지만 찾으시는 분이 많은 것 같아서 해봤습니다. 커스텀 토글 만드실 분은 아래 링크 참고 하셔서 만드시면 되겠습니다. http://www.mokasocial.com/2011/07/sexily-styled-toggle-buttons-for-android/#more-1259 그리고 이렇게 토글로 만들면 이미지만 변경되는 것일 뿐 슬라이드 처리가 되지 않기 때문에 seekbar로 만들면 더 효과가 비슷할 것으로 보이네요. 위에 링크 걸어놓은 싸이트로 들..
- 화면 해상도 알아내기 - 방법 #1 1 DisplayMetrics metrics = new DisplayMetrics(); 2 getWindowManager().getDefaultDisplay().getMetrics(metrics); 3 4 int ScreenWidth = metrics.widthPixels 5 int ScreenHeight = metrics.heightPixels 방법 #2 1 WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE); 2 Display dsp = wm.getDefaultDisplay(); 3 4 int height = dsp.getHeight(); 5 int width = dsp.getWi..
출처 : http://kpbird.blogspot.com/2011/08/android-check-application-is-running.html Android: Check application is running ? Posted by Ketan Parmar at 11:25 PM | Wednesday, August 17, 2011 Android has different application lifecycle, Many times user press Home hardware button and application goes in background, Application is still running but it's in background, Now We want to identify that applic..
자답입니다. 출처 : http://blog.naver.com/kkamci25?Redirect=Log&logNo=10098212677 각 위젯에서 제공하는 setTextSize Method는 2가지를 제공하고 있다. 1. Pixel 값으로 설정하는 방법 setTextSize(float size) : size는 pixel value를 입력하면 된다. 2. Unit Type을 함께 설정하는 방법 setTextSize(int unit, float size) unit 값은 TypedValue class에 정의되어 있는 값으로 다음과 같은 값을 갖는다. /** {@link #TYPE_DIMENSION} complex unit: Value is raw pixels. */ public static final int C..