-
Notifications
You must be signed in to change notification settings - Fork 0
/
IParcelable.xml
239 lines (230 loc) · 13.8 KB
/
IParcelable.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<Type Name="IParcelable" FullName="Android.OS.IParcelable">
<TypeSignature Language="C#" Value="public interface IParcelable : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IParcelable implements class Android.Runtime.IJavaObject, class Java.Interop.IJavaPeerable, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Android.OS.IParcelable" />
<TypeSignature Language="F#" Value="type IParcelable = interface
 interface IJavaObject
 interface IDisposable
 interface IJavaPeerable" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Android.Runtime.IJavaObject</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Interop.IJavaPeerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("android/os/Parcelable", "", "Android.OS.IParcelableInvoker")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("android/os/Parcelable", "", "Android.OS.IParcelableInvoker")>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="1">
<summary>Interface for classes whose instances can be written to
and restored from a <c>Parcel</c>.</summary>
<remarks>
<para>Interface for classes whose instances can be written to
and restored from a <c>Parcel</c>. Classes implementing the Parcelable
interface must also have a non-null public static field called
<c>CREATOR</c> of a type that implements the <c>Parcelable.Creator</c>
interface.</para>
<para>A typical implementation of Parcelable is:</para>
<para><div>
<div class="ds-selector-tabs"><section><h3 id="kotlin">Kotlin</h3></para>
<code lang="text/java">class MyParcelable private constructor(`in`: Parcel) : Parcelable {
private val mData: Int = `in`.readInt()
override fun describeContents(): Int {
return 0
}
override fun writeToParcel(out: Parcel, flags: Int) {
out.writeInt(mData)
}
companion object CREATOR: Parcelable.Creator&lt;MyParcelable?&gt; {
override fun createFromParcel(`in`: Parcel): MyParcelable? {
return MyParcelable(`in`)
}
override fun newArray(size: Int): Array&lt;MyParcelable?&gt; {
return arrayOfNulls(size)
}
}
}
</code>
<para></section><section><h3 id="java">Java</h3></para>
<code lang="text/java">public class MyParcelable implements Parcelable {
private int mData;
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel out, int flags) {
out.writeInt(mData);
}
public static final Parcelable.Creator&lt;MyParcelable&gt; CREATOR
= new Parcelable.Creator&lt;MyParcelable&gt;() {
public MyParcelable createFromParcel(Parcel in) {
return new MyParcelable(in);
}
public MyParcelable[] newArray(int size) {
return new MyParcelable[size];
}
};
private MyParcelable(Parcel in) {
mData = in.readInt();
}
}</code>
<para></section></div></div></para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/os/Parcelable" title="Reference documentation">Java documentation for <code>android.os.Parcelable</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
<Members>
<Member MemberName="ContentsFileDescriptor">
<MemberSignature Language="C#" Value="public const int ContentsFileDescriptor = 1;" />
<MemberSignature Language="ILAsm" Value=".field public static literal int32 ContentsFileDescriptor = (1)" />
<MemberSignature Language="DocId" Value="F:Android.OS.IParcelable.ContentsFileDescriptor" />
<MemberSignature Language="F#" Value="val mutable ContentsFileDescriptor : int" Usage="Android.OS.IParcelable.ContentsFileDescriptor" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("CONTENTS_FILE_DESCRIPTOR")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("CONTENTS_FILE_DESCRIPTOR")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>Descriptor bit used with <c>#describeContents()</c>: indicates that
the Parcelable object's flattened representation includes a file descriptor.</summary>
<remarks>
<para>Descriptor bit used with <c>#describeContents()</c>: indicates that
the Parcelable object's flattened representation includes a file descriptor.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR" title="Reference documentation">Java documentation for <code>android.os.Parcelable.CONTENTS_FILE_DESCRIPTOR</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="DescribeContents">
<MemberSignature Language="C#" Value="public int DescribeContents ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 DescribeContents() cil managed" />
<MemberSignature Language="DocId" Value="M:Android.OS.IParcelable.DescribeContents" />
<MemberSignature Language="F#" Value="abstract member DescribeContents : unit -> int" Usage="iParcelable.DescribeContents " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("describeContents", "()I", "GetDescribeContentsHandler:Android.OS.IParcelableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("describeContents", "()I", "GetDescribeContentsHandler:Android.OS.IParcelableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.</summary>
<returns>a bitmask indicating the set of special object types marshaled
by this Parcelable object instance.</returns>
<remarks>
<para>Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of <c>#writeToParcel(Parcel, int)</c>,
the return value of this method must include the
<c>#CONTENTS_FILE_DESCRIPTOR</c> bit.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/os/Parcelable#describeContents()" title="Reference documentation">Java documentation for <code>android.os.Parcelable.describeContents()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="WriteToParcel">
<MemberSignature Language="C#" Value="public void WriteToParcel (Android.OS.Parcel dest, Android.OS.ParcelableWriteFlags flags);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void WriteToParcel(class Android.OS.Parcel dest, valuetype Android.OS.ParcelableWriteFlags flags) cil managed" />
<MemberSignature Language="DocId" Value="M:Android.OS.IParcelable.WriteToParcel(Android.OS.Parcel,Android.OS.ParcelableWriteFlags)" />
<MemberSignature Language="F#" Value="abstract member WriteToParcel : Android.OS.Parcel * Android.OS.ParcelableWriteFlags -> unit" Usage="iParcelable.WriteToParcel (dest, flags)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("writeToParcel", "(Landroid/os/Parcel;I)V", "GetWriteToParcel_Landroid_os_Parcel_IHandler:Android.OS.IParcelableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("writeToParcel", "(Landroid/os/Parcel;I)V", "GetWriteToParcel_Landroid_os_Parcel_IHandler:Android.OS.IParcelableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dest" Type="Android.OS.Parcel" />
<Parameter Name="flags" Type="Android.OS.ParcelableWriteFlags">
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.GeneratedEnum]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.GeneratedEnum>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="dest">The Parcel in which the object should be written.</param>
<param name="flags">Additional flags about how the object should be written.
May be 0 or <c>#PARCELABLE_WRITE_RETURN_VALUE</c>.</param>
<summary>Flatten this object in to a Parcel.</summary>
<remarks>
<para>Flatten this object in to a Parcel.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)" title="Reference documentation">Java documentation for <code>android.os.Parcelable.writeToParcel(android.os.Parcel, int)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
</Members>
</Type>