Fragments and Dialogs

ADO: Activity Dependent Object implementation

Android Configuration Changes, Restart Activities, Weak References

Condensed or otherwise, Some Fragment Sample code

Config changes research 2

4) DialogFragment



5) fragment animations


fragment animations

Here is some code to monitor activity life cycle

How to use a progress bar from an asynctask

I am not entirely happy how objects, especially worker objects, that are dependent on an activity needs to behave and the framework that is available for them to detect the activity availability.

Yes #Android #Fragments are good. yes #AndroidFragments are helpful. May be fragments will solve all of it. Even with fragments I believe there is a case to be made for something called "Activity Dependent Objects" or ADOs in Android.

These are some notes from my thought process here. Mainly as a reminders to myself so that when it is time for me to aggregate them into a framework I would have remembered them.

As I have worked with this idea in the last few months, I think it is mildly helpful. For me it clarified the lifecycle of fragments and activities really well.

The early illustrations below are mainly my brain gibberish and they coalesce more as you scroll down. Also the key conclusions are towards the end. If "Activity Dependent Objects" intrigues you read on.

They are both used to offload work from the main thread. All components in Android run on the main thread. the UI runs on the main thread. the broadcast receivers run on the main thread. Android Services run on the main thread. So it is really useful to have some facility that can offload work from the main thread.

In the #AndroidSDK both #AsyncTask and #IntentService can do this work. Are there any guidelines as to which is appropriate when?

Retaining fragments across configuration changes

Seeking a better pattern for constructing inherited fragments

Find here early research on Android fragments.

Some notes on android dialogs

It is not trivial to create an asynctask and monitor its progress on an activity's progress dialog.

The techniques you need to implement well include fragment dialogs, retained fragments, non-cancellable dialogs, or retained objects, that also can clean themselves up as various asynchronous events take place in the system.

With out a proper set of test cases it is very easy to miss the expected behavior.

Here is a list of test cases that I can think of in my limited research on this item.

This topic covers the nuances of AsyncTask and progress dialogs in android. This is based on notes taken for ProAndroid 3 and 4 books.

Understanding Fragments through Key Questions