PendingIntent readPendingIntentOrNullFromParcel - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for PendingIntent readPendingIntentOrNullFromParcel method.

This code example shows how to use the following methods:readPendingIntentOrNullFromParcel, readInt
           this.viewId = id;
           this.pendingIntent = pendingIntent;
       } 
        
       public SetOnClickPendingIntent(Parcel parcel) {
           viewId = parcel.readInt();
           pendingIntent = PendingIntent.readPendingIntentOrNullFromParcel(parcel);
       } 
        
        
       public void writeToParcel(Parcel dest, int flags) {
           dest.writeInt(TAG);
           dest.writeInt(viewId);
           pendingIntent.writeToParcel(dest, 0 /* no flags */);
       } 
        
       @Override 
       public void apply(View root) {
           final View target = root.findViewById(viewId);           
           if (target != null && pendingIntent != null) {
4
CodeRank
readPendingIntentOrNullFromParcel Method Overview
Convenience function for reading either a Messenger or null pointer from a Parcel.
See Code Examples for other Android PendingIntent Methods: