Example usage for android.widget RemoteViews CREATOR

List of usage examples for android.widget RemoteViews CREATOR

Introduction

In this page you can find the example usage for android.widget RemoteViews CREATOR.

Prototype

Parcelable.Creator CREATOR

To view the source code for android.widget RemoteViews CREATOR.

Click Source Link

Document

Parcelable.Creator that instantiates RemoteViews objects

Usage

From source file:android.app.Notification.java

/**
 * Unflatten the notification from a parcel.
 *//*from   w  w  w  .j  a  v a2s  . co m*/
public Notification(Parcel parcel) {
    int version = parcel.readInt();

    when = parcel.readLong();
    icon = parcel.readInt();
    number = parcel.readInt();
    if (parcel.readInt() != 0) {
        contentIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        deleteIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        tickerView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        contentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
    if (parcel.readInt() != 0) {
        largeIcon = Bitmap.CREATOR.createFromParcel(parcel);
    }
    defaults = parcel.readInt();
    flags = parcel.readInt();
    if (parcel.readInt() != 0) {
        sound = Uri.CREATOR.createFromParcel(parcel);
    }

    audioStreamType = parcel.readInt();
    vibrate = parcel.createLongArray();
    ledARGB = parcel.readInt();
    ledOnMS = parcel.readInt();
    ledOffMS = parcel.readInt();
    iconLevel = parcel.readInt();

    if (parcel.readInt() != 0) {
        fullScreenIntent = PendingIntent.CREATOR.createFromParcel(parcel);
    }

    priority = parcel.readInt();

    kind = parcel.createStringArray(); // may set kind to null

    if (parcel.readInt() != 0) {
        extras = parcel.readBundle();
    }

    actions = parcel.createTypedArray(Action.CREATOR);
    if (parcel.readInt() != 0) {
        bigContentView = RemoteViews.CREATOR.createFromParcel(parcel);
    }
}