본문 바로가기

Android

(14)
Android Layout 참고할 때 좋은 Layout Tricks http://www.androidpub.com/256251#5 정말 유익한 글이네요. 원문은 http://developer.android.com/resources/articles/layout-tricks-reuse.html 이곳입니다.
R.styleable R.styleable 은 res/values/attrs.xml 에서 참조할 수 있다. 그리고 아래와 같이 사용 Create a file called attrs.xml and place the following in it: Then replace the code in ImageAdapter with the following: TypedArray a = obtainStyledAttributes (R.styleable.default_gallery); mGalleryItemBackground = a.getResourceId( R.styleable.default_gallery_android_galleryItemBackground, 0);
Android 크기(길이) 단위 ㆍpx : 사용중인 화면 픽셀 e.g. "10px" ㆍin : 인치 e.g. "0.5in" ㆍ mm : 미리미터 e.g. "10mm" ㆍpt : 포인트 수(사용화면에서 1/72인치) e.g. "10pt" ㆍdp : 해상도 비 e.g. "10dp" ㆍdip : Density-Independent Pixels. 밀도에 독립적인 화소.. 이것을 써서 레이아웃을 만들어야 한다. e.g. "10dip" ㆍsp : scaled pixels based on preferred font size e.g. "20sp" android:textSize Since: API Level Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (..
Android의 string.xml 은 왜 단일 파일로 관리될까요? API Demos Application Application Application Application Application Application Application 안드로이드의 string을 관리할 수 있는 values/string.xml 파일의 예시이다. 그런데 대체 왜 단일파일안에 모든 string을 관리하는걸까? 아니면 소분류를 자동으로 지정해서 관리할 수 있는 체계가 낫지 않을까?? (Activity 별로 따로 하면 편할 것 같다. 공통으로 사용하는 변수도 따로 관리하고..) 프로그램 규모가 커지면 코딩할 때에 상당히 불편하다.. 위에서 보듯이 실제로 프로그래밍 할 때에 starcraft II game is ok game is cancled 이런식으로 string을 사용하는 액티비티명 등으로 ..
Android adb shell 접속하기 adb shell에 접속하고 장치 설치하는 방법까지 입니다. 커맨드 창에서 안드로이드 sdk가 등록된 폴더로 갑니다. sdk디렉토리 아래의 tools 디렉토리로 가서 > adb shell 을 실행하면 adb shell로 들어갈 수 있습니다. shell이기 때문에 기본적인 linux환경을 사용해보셨으면 쉽게 사용하실 수 있을 겁니다. 참고로 adb install 방법입니다. adb install xxx.apk Wiki를 참조하세요. 위키에 잘 나와있습니다. http://android-dls.com/wiki/index.php?title=ADB
Android Developers Reference http://developer.android.com/reference/classes.html Android의 개발자 API 입니다. Reference와 Dev Guide를 보시면 좋은 정보를 보실 수 있습니다.