페이지

2011년 5월 23일 월요일

Activity 변경 애니메이션 효과 - overridePendingTransition

안드로이드 2.0 ( api level 5 ) 부터 액티비티가 보여지고, 없어질때 뷰처럼 애니메이션을
설정할 수 있다.

사용법도 간단하다.
startActivity(); 를 하고, overridePendingTransition( R.anim.new_activity, R.anim.old_activity );

애니메이션이 설정되지 않은 경우는 새 액티비티는 오른쪽에서 슬라이드-인 되고,
기존 액티비티는 왼쪽으로 슬라이드-아웃 된다.

애니메이션은 기존 방식과 동일하게 res/anim 폴더에 xml 로 작성하던가,
Animation 객체를 생성해 사용해도 된다.

[ fade - animation ]

<alpha xmlns:android="http://schemas.android.com/apk/res/android"
       android:interpolator="@android:anim/accelerate_interpolator"
       android:fromAlpha="0.0" android:toAlpha="1.0"
       android:duration="@android:integer/config_longAnimTime" />

[ hold - animation ]

<translate xmlns:android="http://schemas.android.com/apk/res/android"
       android:interpolator="@android:anim/accelerate_interpolator"
       android:fromXDelta="0" android:toXDelta="0"
       android:duration="@android:integer/config_longAnimTime" />

[ zoom_enter- animation ]

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:interpolator="@android:anim/decelerate_interpolator">
    <scale android:fromXScale="2.0" android:toXScale="1.0"
           android:fromYScale="2.0" android:toYScale="1.0"
           android:pivotX="50%p" android:pivotY="50%p"
           android:duration="@android:integer/config_mediumAnimTime" />
</set>

[ zoom_exit - animation ]

<set xmlns:android="http://schemas.android.com/apk/res/android"
        android:interpolator="@android:anim/decelerate_interpolator"
        android:zAdjustment="top">
    <scale android:fromXScale="1.0" android:toXScale=".5"
           android:fromYScale="1.0" android:toYScale=".5"
           android:pivotX="50%p" android:pivotY="50%p"
           android:duration="@android:integer/config_mediumAnimTime" />
    <alpha android:fromAlpha="1.0" android:toAlpha="0"
            android:duration="@android:integer/config_mediumAnimTime"/>
</set>

2011년 4월 12일 화요일

IPC - (Interprocess Communication)

IPC[아이피씨]프로그래머가 하나의 운영체계에서 동시에 수행될 개별 프로그램을 생성하고 다룰 수 있도록 해주는 프로그래밍 인터페이스 집합으로서, 하나의 프로그램이 동시에 많은 사용자의 요구를 처리할 수 있도록 한다. 단일 사용자의 요구가 운영체계에서 여러 프로세스를 수행시키는 결과를 가져올 수 있기 때문에, 이러한 사용자를 위해 프로세스간 통신이 필요하게 되는데 IPC 인터페이스가 이를 가능케 한다. 모든 IPC 메쏘드들은 각각 장점 및 한계점이 있어서 한 프로그램에서 모든 IPC 메쏘드를 사용하는 예는 드물다. IPC 메쏘드는 다음의 것들을 포함한다.

2011년 4월 11일 월요일

HAL - (hardware abstraction layer)

컴퓨터에서, HAL은 컴퓨터 운영체계가 자세한 하드웨어 계층이 아닌 일반적이거나, 추상적인 계층에서 하드웨어 서비스와 상호 작용할 수 있게 해주는 프로그램 계층이다. 윈도우2000은 HAL을 포함하고 있는 운영체계 중 하나이다. HAL은 운영체계의 커널이나 장치 드라이버로부터 호출될 수 있다. 어떤 경우든, 호출되는 프로그램은 그렇지 않은 경우보다, 장치와 좀더 일반적인 방식으로 상호 작용할 수 있다.