Search in sources :

Example 96 with Parcelable

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;
}
Also used : Parcelable(android.os.Parcelable)

Example 97 with Parcelable

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;
            }
    }
}
Also used : Activity(android.app.Activity) Parcelable(android.os.Parcelable) MessageReference(com.fsck.k9.activity.MessageReference)

Example 98 with Parcelable

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;
}
Also used : Parcelable(android.os.Parcelable)

Example 99 with Parcelable

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;
}
Also used : Parcelable(android.os.Parcelable)

Example 100 with Parcelable

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;
}
Also used : Bundle(android.os.Bundle) Parcelable(android.os.Parcelable)

Aggregations

Parcelable (android.os.Parcelable)818 Bundle (android.os.Bundle)99 View (android.view.View)85 Intent (android.content.Intent)56 SparseArray (android.util.SparseArray)38 Test (org.junit.Test)31 ArrayList (java.util.ArrayList)26 MenuItem (android.view.MenuItem)23 ImageView (android.widget.ImageView)23 TextView (android.widget.TextView)17 MenuItem (com.actionbarsherlock.view.MenuItem)14 SuppressLint (android.annotation.SuppressLint)13 Dialog (android.app.Dialog)13 MediumTest (android.support.test.filters.MediumTest)13 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)12 Paint (android.graphics.Paint)12 MenuView (com.android.internal.view.menu.MenuView)12 RemoteException (android.os.RemoteException)11 Bitmap (android.graphics.Bitmap)10 ShortcutIconResource (android.content.Intent.ShortcutIconResource)9