1. App


1.1. Activity


1.1.1. Animation

- 화면전환을 애니메이션으로 처리한다.

Fade in/out

Zoom in/out

slide bottom to top

slide top to bottom

slide left / slide right

* android.app.Activity.overridePendingTransition

1.1.2. Custom Dialog

화면에 메시지를 보여준다. 확인/취소 등의 버튼은 없다.

1.1.3. Dialog

- 화면에 메시지를 보여준다. 확인/취소 등의 버튼은 없다.

- activity title 에 left icon을 추가할 수 있다.

* android.app.Activity.requestWindowFeature(Window.FEATURE_LEFT_ICON);

* getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert);

1.1.4. Forwarding

- activity stack에서 임의의 activity를 제거한다.

back button을 눌러도 제거된 activity는 나타나지 않고, 이전 activity가 나타난다.

다른 activity를 호출하고(startActivity), 제거하고자 하는 activity의 finish 메소드를 호출한다.

* startActivity / finish

1.1.5. HelloWorld

- 아주 기본적이고 전통적인 "안녕 세상아!"


1.1.6. PersistentState

- Activity의 onResume(), onPause() lifecycle 메소드에서 SharedPreferences에 설정값을 꺼내거나 보관한다.

* Activity.getPreferences(int mode)

* android.content.SharedPreferences

1.1.7. QuickContentsDemo

- 주소록의 연락처 데이타 목록을 보여준다.

* android.app.ListActivity

* android.widget.ResourceCursorAdapter

* android.content.ContentProvider

* android.content.ContentResolver

* android.app.Activity.getContentResolver()


1.1.8. Receive Result

- 다른 activity를 호출하고, 선택/결과값을 받는다.

- 결과값을 전달하는 activity에서는 setResult 메소드를 호출한 후 finish 처리를 한다.

* startActivityForResult

* onActivityResult(int requestCode, int resultCode, Intent data)

* setResult

* 참고

서로다른 앱간에 데이타를 주고받을 경우 startActivity 메소드를 사용할 수 있다.

이런 경우 startActivity 메소드를 호출하고 finish 메소드를 사용하여 해당 앱을 종료한다.

(단 AndroidManifast.xml 파일에 호출하는/호출당하는 url 을 명시해야 한다.)

호출을 당하는 앱에서는 onCreate 메소드에서 getIntent 메소드로 호출된 데이타를 얻을 수 있다.

결과값을 받을 때도 onCreate 메소드에서 getIntent 메소드로 결과 데이타를 얻을 수 있다.

앱에서 ISPMobile 과 같은 결제처리를 하는 경우 이와 같은 방식을 사용하고 있다.

아이폰/아이패드는 이와 비슷한 형태로 앱간에는 URL로만 호출할 수 있다.

(iOS에서는 Info.plist xml 파일에 해당 url 정보를 설정한다.)


1.1.9. Redirection

- SharedPreferences에 설정된 값에 따라 activity를 분기한다.

* SharedPreferences

* Intent

* startActivity / startActivityForResult


1.1.10. Reorder Activities

- activity history stack의 첫번째로 가져온다.

* Intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)

* Intent.FLAG_ACTIVITY_REORDER_TO_FRONT


1.1.11. Save & Restore State

- 입력값/상태값을 저장한다.

어떤 과정을 거쳐서 구현되는 것인지 잘 파악이 안된다.

* layout.xml의 android:freezesText="true"


1.1.12. SetWallpaper

- 메인 바탕화면의 이미지를 가져오기/변경하기

* android.view.WindowManager.getInstance(this)

1.1.13. Translucent

- 배경을 반투명 처리한다.

* activity에 style/theme를 사용하여 적용한다. (AndroidManifest.xml, styles.xml)

<style name="Theme.Translucent" parent="android:style/Theme.Translucent">

...

1.1.14. Translucent Blur

- 배경을 반투명/흐릿하게 처리한다.

* style/theme를 사용 및 window flag를 설정하여 적용한다.

Activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND);

1.1.15. Wallpaper

- 배경을 메인 바탕화면으로 적용한다.

* activity에 style/theme를 사용하여 적용한다. (AndroidManifest.xml, styles.xml)

<style name="Theme.Wallpaper" parent="android:style/Theme.Wallpaper">

...


1.2. Alarm

1.2.1. Alarm Controller

- 알람을 일시/주기적으로 발생시킨다. (short term)

BroadcastReceiver에서 알람 표출

* (android.app.AlarmManager)getSystemService(ALARM_SERVICE)

* android.app.PendingIntent.getBroadcast

* android.content.BroadcastReceiver interface

1.2.2. Alarm Service

- 알람을 일시/주기적으로 발생시킨다. (long term)

android.app.Service 에서 알람 표출

* (android.app.AlarmManager)getSystemService(ALARM_SERVICE)

* android.app.PendingIntent.getService

* android.app.Service interface


1.3. Dialog (AlertDialogSamples.java)

- OK/Cancel dialog with a message

- OK/Cancel dialog with a long message

- List dialog

- Progress dialog

- Single choice list

- Repeat alarm (multi choice list)

- Text Entry dialog

* android.app.Activity.showDialog(int id)

* android.app.AlertDialog.Builder

* android.app.Dialog

* android.app.ProgressDialog

* android.content.DialogInterface

 

1.4. Intents

- launch activity, service, broadcast

* android.content.Intent

 

1.5. Launcher Shortcuts

- home screen에 shortcut을 생성할 때, 특정 activity가 나오도록 shortcut을 만들 수 있다.

* Intent.ACTION_CREATE_SHORTCU


 

1.6. Menu

1.6.1. Inflate from XML

 

1.7. Notification

1.7.1. IncomingMessage

1.7.2. Notifying Service Controller

1.7.3. NotifyWithText

1.7.4. Status Bar

 

1.8. Preferences

1.8.1. Preferences from XML

1.8.2. Launching preferences

1.8.3. Preference dependencies

1.8.4. Default values

1.8.5. Preference from code

1.8.6. Advanced preferences


1.9. Search

1.9.1. Invoke Search

1.9.2. Query Search Results


1.10. Service

1.10.1. Foreground Service Controller

1.10.2. Local Service Binding

1.10.3. Local Service Controller

1.10.4. Remote Service Binding

1.10.5. Remote Service Controller

1.10.6. Service Start Arguments Controller


1.11. Text-To-Speech


1.12. Voice Recognition


2. Content

2.1. Assets

2.2. Resources

 

3. Graphics

3.1. AlphaBitmap

3.2. AnimateDrawables

3.3. Arcs

3.4. BitmapDecode

3.5. BitmapMesh

3.6. BitmapPixels

3.7. CameraPreview

3.8. Clipping

3.9. ColorFilters

3.10. ColorMatrix

3.11. Compass

3.12. CreateBitmap

3.13. Density

3.14. Drawable

3.15. FingerPaint

3.16. Layers

3.17. MeasureText

3.18. OpenGL ES

3.19. PathEffects

3.20. PathFillTypes

3.21. Patterns

3.22. Pictures

3.23. Points

3.24. PurgeableBitmap

3.25. Regions

3.26. RoundRects

3.27. ScaleToFit

3.28. SensorTest

3.29. SurfaceView Overlay

3.30. Sweep

3.31. Text Align

3.32. Touch Paint

3.33. Typefaces

3.34. UnicodeChart

3.35. Vertices

3.36. Xfermodes

 

4. Media

4.1. Media Player

4.2. VideoView

 

5. OS

5.1. Morse Code

5.2.Sensors

 

6. Text

6.1. Linkify

6.2. LogTextBox

6.3. Marquee

 

7. Views

7.1. Animation

7.2. Auto Complete

7.3. Buttons

7.4. Chronometer

7.5. Controls

7.6. Custom

7.7. Date Widgets

7.8. Expandable Lists

7.9. Focus

7.10. Gallery

7.11. Grid

7.12. ImageButton

7.13. ImageSwitcher

7.14. ImageView

7.15. Logout Animation

7.16. Layouts

7.17. Lists

7.18. Progress Bar

7.19. Radio Group

7.20. Rating Bar

7.21. ScrollBars

7.22. Seek Bar

7.23. Spinner

7.24. Tabs

7.25. TextSwitcher

7.26. Visibility

7.27. WebView

 

'Android' 카테고리의 다른 글

[Android] 키보드 숨기기/보이기  (0) 2012.07.19
[Android]안드로이드 라이프 사이클  (0) 2012.06.21
[Android]D-day 계산기 만들어보기.  (0) 2012.05.29
[Android]키보드 입력 종류  (0) 2012.05.29
[Android]형변환 종류  (0) 2012.05.29