Sunday, August 29, 2010

API demos notes

1. SharedPreferences : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/PersistentState.html
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/RedirectEnter.html - follow the classes in the source for advanced SharedPreferences ops.
eg: preferences.edit().remove("text").commit();

2. TextView.BufferType.EDITABLE - This allows us to later extend the text buffer : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/ReceiveResult.html

3. Example of removing yourself from the history stack after forwarding to another activity(just call finish) : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/Forwarding.html

4. Translucent activity - android:theme="@style/Theme.Transparent" in the activity declaration in manifest : http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/TranslucentActivity.html

5. Translucent+BLUR background -

    // Have the system blur any windows behind this one.
       getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
       WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
Also in manifest - android:theme="@style/Theme.Transparent"> :  http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/TranslucentBlurActivity.html

6. Services : later

7.

No comments:

Post a Comment