본문 바로가기

전체 글

(97)
시간표시 관련 튜토리얼 http://java.sun.com/docs/books/tutorial/i18n/format/simpleDateFormat.html Date today; String output; SimpleDateFormat formatter; formatter = new SimpleDateFormat(pattern, currentLocale); today = new Date(); output = formatter.format(today); System.out.println(pattern + " " + output); The following table shows the output generated by the previous code example when the U.S. Locale is specified: Cu..
Android Service 에서 Activity 실행 Context context = getApplicationContext(); Intent intent = new Intent(context, Action.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); 여기서 FLAG_ACTIVITY_NEW_TASK 이 플래그.. 이 플래그로 호출되면 동일한 Activity가 검색될 시 그 Activity창이 뜬다.
Android URI List 원문은 http://www.openintents.org/en/uris 여기 참조. List of URIs Show: Applications Intents URIs Extras This is a list of URIs that can be used in intents. View all fields. Add a new URI. Title URIs or MIME types Description A collection content://net.lp.collectionista.products/collections For internal use only: content://net.lp.collectionista.products.collections For example: content://net.lp.collect..
Android Intent (인텐트) 표준 인텐트에 대해 알아보기.. 표준 액션들 ACTION_MAIN ACTION_VIEW ACTION_ATTACH_DATA ACTION_EDIT ACTION_PICK ACTION_CHOOSER ACTION_GET_CONTENT ACTION_DIAL ACTION_CALL ACTION_SEND ACTION_SENDTO ACTION_ANSWER ACTION_INSERT ACTION_DELETE ACTION_RUN ACTION_SYNC ACTION_PICK_ACTIVITY ACTION_SEARCH ACTION_WEB_SEARCH ACTION_FACTORY_TEST 표준 브로드캐스트 액션들(어떤 사건이 발생했는지) ACTION_TIME_TICK ACTION_TIME_CHANGED ACTION_TIMEZONE_CHA..
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을 사용하는 액티비티명 등으로 ..