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. 244b25d63ff53d4676150ac54897851e4ff9f1049fAurimas Liutikas * 254b25d63ff53d4676150ac54897851e4ff9f1049fAurimas Liutikas * @deprecated Use {@link android.os.Parcelable.ClassLoaderCreator} directly. 260574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 274b25d63ff53d4676150ac54897851e4ff9f1049fAurimas Liutikas@Deprecated 285c1637087453de15e31861f073eae5133c4e9f7bDianne Hackbornpublic interface ParcelableCompatCreatorCallbacks<T> { 290574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov 300574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov /** 310574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * Create a new instance of the Parcelable class, instantiating it 320574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * from the given Parcel whose data had previously been written by 330574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * {@link Parcelable#writeToParcel Parcelable.writeToParcel()} and 340574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * using the given ClassLoader. 350574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * 360574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param in The Parcel to read the object's data from. 370574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param loader The ClassLoader that this object is being created in. 380574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @return Returns a new instance of the Parcelable class. 390574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 404b25d63ff53d4676150ac54897851e4ff9f1049fAurimas Liutikas T createFromParcel(Parcel in, ClassLoader loader); 410574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov 420574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov /** 430574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * Create a new array of the Parcelable class. 440574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * 450574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @param size Size of the array. 460574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * @return Returns an array of the Parcelable class, with every entry 470574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov * initialized to null. 480574ca37da4619afe4e26753f5a1b4de314b6565Svetoslav Ganov */ 494b25d63ff53d4676150ac54897851e4ff9f1049fAurimas Liutikas T[] newArray(int size); 50ea2c91b0198855073983b4a8437aa71cbd83872fDianne Hackborn} 51