use of android.os.Parcelable in project superCleanMaster by joyoyao.
the class WaveView method onSaveInstanceState.
@Override
public Parcelable onSaveInstanceState() {
// Force our ancestor class to save its state
Parcelable superState = super.onSaveInstanceState();
SavedState ss = new SavedState(superState);
ss.progress = mProgress;
return ss;
}
use of android.os.Parcelable in project k-9 by k9mail.
the class MessageListHandler method handleMessage.
@Override
public void handleMessage(android.os.Message msg) {
MessageListFragment fragment = mFragment.get();
if (fragment == null) {
return;
}
// The following messages don't need an attached activity.
switch(msg.what) {
case ACTION_REMOTE_SEARCH_FINISHED:
{
fragment.remoteSearchFinished();
return;
}
}
// Discard messages if the fragment isn't attached to an activity anymore.
Activity activity = fragment.getActivity();
if (activity == null) {
return;
}
switch(msg.what) {
case ACTION_FOLDER_LOADING:
{
String folder = (String) msg.obj;
boolean loading = (msg.arg1 == 1);
fragment.folderLoading(folder, loading);
break;
}
case ACTION_REFRESH_TITLE:
{
fragment.updateTitle();
break;
}
case ACTION_PROGRESS:
{
boolean progress = (msg.arg1 == 1);
fragment.progress(progress);
break;
}
case ACTION_GO_BACK:
{
fragment.fragmentListener.goBack();
break;
}
case ACTION_RESTORE_LIST_POSITION:
{
fragment.listView.onRestoreInstanceState((Parcelable) msg.obj);
break;
}
case ACTION_OPEN_MESSAGE:
{
MessageReference messageReference = (MessageReference) msg.obj;
fragment.fragmentListener.openMessage(messageReference);
break;
}
}
}
use of android.os.Parcelable in project k-9 by k9mail.
the class MessageHeader method onSaveInstanceState.
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState savedState = new SavedState(superState);
savedState.additionalHeadersVisible = additionalHeadersVisible();
return savedState;
}
use of android.os.Parcelable in project k-9 by k9mail.
the class MessageContainerView method onSaveInstanceState.
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
SavedState savedState = new SavedState(superState);
savedState.attachmentViewVisible = (mAttachmentsContainer != null && mAttachmentsContainer.getVisibility() == View.VISIBLE);
savedState.showingPictures = showingPictures;
return savedState;
}
use of android.os.Parcelable in project k-9 by k9mail.
the class ColorPicker method onSaveInstanceState.
@Override
protected Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
Bundle state = new Bundle();
state.putParcelable(STATE_PARENT, superState);
state.putFloat(STATE_ANGLE, mAngle);
return state;
}
Aggregations