Udostępnij za pośrednictwem


Intent.ParseIntent(Resources, XmlReader, IAttributeSet) Method

Definition

Parses the "intent" element (and its children) from XML and instantiates an Intent object.

[Android.Runtime.Register("parseIntent", "(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;)Landroid/content/Intent;", "")]
public static Android.Content.Intent ParseIntent (Android.Content.Res.Resources resources, System.Xml.XmlReader parser, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register("parseIntent", "(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;)Landroid/content/Intent;", "")>]
static member ParseIntent : Android.Content.Res.Resources * System.Xml.XmlReader * Android.Util.IAttributeSet -> Android.Content.Intent

Parameters

resources
Resources

The Resources to use when inflating resources.

parser
XmlReader

The XML parser pointing at an "intent" tag.

attrs
IAttributeSet

The AttributeSet interface for retrieving extended attribute data at the current <var>parser</var> location.

Returns

An Intent object matching the XML data.

Attributes

Exceptions

If there was an XML parsing error.

If there was an I/O error.

Remarks

Parses the "intent" element (and its children) from XML and instantiates an Intent object. The given XML parser should be located at the tag where parsing should start (often named "intent"), from which the basic action, data, type, and package and class name will be retrieved. The function will then parse in to any child elements, looking for <category android:name="xxx"> tags to add categories and <extra android:name="xxx" android:value="yyy"> to attach extra data to the intent.

Java documentation for android.content.Intent.parseIntent(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to