"Android" 12.0 12th Chapter Intent and its filters-example of this chapter main interface

Source: Internet
Author: User
<span id="Label3"></p><p><p>Category: C #, Android, VS2015;</p></p><p><p>Date created: 2016-02-23 I. INTRODUCTION</p></p><p><p>In this chapter we mainly learn the basic usage of intent and demonstrate the following functions through Examples:</p></p><p><p>How to start another interface;</p></p><p><p>How to get the return value of another interface;</p></p><p><p>How to use intent to read pictures in the gallery;</p></p><p><p>How to use intent to read and update contacts;</p></p><p><p>How to use intent to realize Notepad Function. second, This chapter sample main interface</p></p><p><p>1. operation</p></p><p><p></p></p> <p><p>2, the corresponding code in the MainActivity.cs file</p></p><pre>Chitems.add (<span style="color: #0000ff"><span style="color: #0000ff">New</span></span><span style="color: #000000"><span style="color: #000000">Chapter () {chaptername</span></span>=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">12th Chapter Intent and its filter</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000">, Chapteritems</span></span>=<span style="color: #0000ff"><span style="color: #0000ff">New</span></span><span style="color: #000000"><span style="color: #000000">chitem[] {</span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Chitem {type=<span style="color: #0000ff"><span style="color: #0000ff">typeof</span></span>(ch1201intentdemomain), title=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">Example 12-1 Intent basic usage 1</span></span><span style="color: #800000"><span style="color: #800000">"</span></span>, Desc =<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">demonstrates the basic use of starting another activity</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000"> }, </span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Chitem {type=<span style="color: #0000ff"><span style="color: #0000ff">typeof</span></span>(ch1202main), title=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">Example 12-2 Intent basic Usage 2</span></span><span style="color: #800000"><span style="color: #800000">"</span></span>, Desc =<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">shows how to get the return value of another activity</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000"> }, </span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Chitem {type=<span style="color: #0000ff"><span style="color: #0000ff">typeof</span></span>(ch1203readgallery), title=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">Example 12-3 reading</span> a gallery image</span><span style="color: #800000"><span style="color: #800000">"</span></span>, Desc =<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">demonstrates how to use intent to read pictures from a gallery</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000"> }, </span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Chitem {type=<span style="color: #0000ff"><span style="color: #0000ff">typeof</span></span>(ch1204readcontactsmain), title=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">example 12-4 reading and updating contacts</span></span><span style="color: #800000"><span style="color: #800000">"</span></span>, Desc =<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">demonstrates how to use intent to read pictures from a gallery</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000"> }, </span></span><span style="color: #0000ff"><span style="color: #0000ff">New</span></span>Chitem {type=<span style="color: #0000ff"><span style="color: #0000ff">typeof</span></span>(ch1205notepadmain), title=<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">example 12-5 reading and writing Notepad</span></span><span style="color: #800000"><span style="color: #800000">"</span></span>, Desc =<span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #800000"><span style="color: #800000">demonstrates how to use intent to read pictures from a gallery</span></span><span style="color: #800000"><span style="color: #800000">"</span></span><span style="color: #000000"><span style="color: #000000"> }, }});</span></span></pre><p><p>"Android" 12.0 12th Chapter Intent and its filters-example of this chapter main interface</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.