1ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn/* 2ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * Copyright (C) 2011 The Android Open Source Project 3ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * 4ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * Licensed under the Apache License, Version 2.0 (the "License"); 5ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * you may not use this file except in compliance with the License. 6ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * You may obtain a copy of the License at 7ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * 8ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * http://www.apache.org/licenses/LICENSE-2.0 9ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * 10ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * Unless required by applicable law or agreed to in writing, software 11ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * distributed under the License is distributed on an "AS IS" BASIS, 12ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * See the License for the specific language governing permissions and 14ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn * limitations under the License. 15ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn */ 16ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn 175c1637087453de15e31861f073eae5133c4e9f7bDianne Hackbornpackage android.support.v4.os; 18ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn 195c1637087453de15e31861f073eae5133c4e9f7bDianne Hackbornimport android.os.Parcel; 200574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganovimport android.os.Parcelable; 21ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn 220574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov/** 230574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * Callbacks a {@link Parcelable} creator should implement. 240574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 255c1637087453de15e31861f073eae5133c4e9f7bDianne Hackbornpublic interface ParcelableCompatCreatorCallbacks<T> { 260574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov 270574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov /** 280574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * Create a new instance of the Parcelable class, instantiating it 290574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * from the given Parcel whose data had previously been written by 300574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * {@link Parcelable#writeToParcel Parcelable.writeToParcel()} and 310574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * using the given ClassLoader. 320574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * 330574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param in The Parcel to read the object's data from. 340574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param loader The ClassLoader that this object is being created in. 350574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @return Returns a new instance of the Parcelable class. 360574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 375c1637087453de15e31861f073eae5133c4e9f7bDianne Hackborn public T createFromParcel(Parcel in, ClassLoader loader); 380574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov 390574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov /** 400574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * Create a new array of the Parcelable class. 410574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * 420574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param size Size of the array. 430574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @return Returns an array of the Parcelable class, with every entry 440574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * initialized to null. 450574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 465c1637087453de15e31861f073eae5133c4e9f7bDianne Hackborn public T[] newArray(int size); 47ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn} 48