Code example for Parcel

Methods: writeBooleanArray

  // Method used by the parcelable functionality of this class 
  public void writeToParcel(Parcel dest, int flags)
    super.writeToParcel(dest, flags);
    dest.writeBooleanArray(new boolean[] { mSelected });
  // Getter method 
  protected boolean IsSelected() { return mSelected; }
  // Method called to get a view object for this item 
  protected View GetView(Context context)
    // Create the linear layout 
    LinearLayout linearLayout = new LinearLayout(context);
    // Use scaled pixels for the padding since the height of the horizontal scroll list 
    //    that contains these items is set in scaled pixels