본문 바로가기

Android

(22)
Android - 화면 안꺼지게 하기 원하는 Activity의 Oncreate()함수에 아래 코드를 넣으시면 아무런 입력이 없어도 화면이 꺼지지 않습니다. getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); -------------------------------------------------- 여러 Activity 를 가지고 있을 경우에는 어떻게 해야 하지? 각 Activity마다 다 넣어줘야 하나? [출처] Android - 화면 안꺼지게 하기|작성자 xgraph http://blog.naver.com/xgraph?Redirect=Log&logNo=150081927021
Android Builder Class http://d.android.com/reference/android/os/Build.html 참고.. Build.VERSION.SDK 이런식으로 사용하면 되겠다. Nested Classes class Build.VERSION Various version strings. class Build.VERSION_CODES Enumeration of the currently known SDK version codes. Constants String BOARD The name of the underlying board, like "goldfish". String BRAND The brand (e.g., carrier) the software is customized for, if any. String CPU_AB..
시간표시 관련 튜토리얼 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);