編輯電子書 - 獨立型intent有參數傳遞
書名:
型號:
價格:
簡介:
個別注入參數 調用intent.putExtra(name,value)方法依序注入參數。 統一注入參數 透過Bundle將要傳入的參數集合到Bundle物件中再注入到Intent。 範例程式(CH05_02_BMI):BMI計算並利用Bundle傳入參數 執行結果: 點圖觀看大圖 統一注入參數的程式碼寫法: 取回傳送參數並且計算後顯示的方法:
內容:
<div> </div> <div> <table border="0" cellpadding="0" cellspacing="0" style="background-color:rgb(255, 255, 255); color:rgb(0, 0, 0); font-family:arial,新細明體; width:95%"> <tbody> <tr> <td> <table border="0" cellpadding="0" cellspacing="0" style="width:570px"> <tbody> <tr> <td> <div style="position: relative; left: 0px;"> <table style="table-layout:fixed; width:590px; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td> <div style="position: relative; top: 1px;"><img id="exImg" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/dot_1.gif" style="height:18px; width:18px" /></div> </td> <td>個別注入參數</td> </tr> </tbody> </table> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> <div class="txt01" style="position: relative; left: 24px; width: 560px;"> <table style="table-layout:fixed; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td>調用intent.putExtra(name,value)方法依序注入參數。</td> </tr> </tbody> </table> </div> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> </div> <div style="position: relative; left: 0px;"> <table style="table-layout:fixed; width:590px; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td> <div style="position: relative; top: 1px;"><img id="exImg" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/dot_1.gif" style="height:18px; width:18px" /></div> </td> <td>統一注入參數</td> </tr> </tbody> </table> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> <div class="txt01" style="position: relative; left: 24px; width: 560px;"> <table style="table-layout:fixed; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td>透過Bundle將要傳入的參數集合到Bundle物件中再注入到Intent。</td> </tr> </tbody> </table> </div> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> </div> <div style="position: relative; left: 0px;"> <table style="table-layout:fixed; width:590px; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td> <div style="position: relative; top: 1px;"><img id="exImg" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/dot_1.gif" style="height:18px; width:18px" /></div> </td> <td>範例程式(CH05_02_BMI):BMI計算並利用Bundle傳入參數</td> </tr> </tbody> </table> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> <div class="txt01" style="position: relative; left: 24px; width: 560px;"> <table style="table-layout:fixed; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td>執行結果:</td> </tr> </tbody> </table> </div> </div> <div> <table> <tbody> <tr> <td> <p> </p> </td> <td> <table align="center" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_l01.gif" style="height:13px; width:13px" /></td> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_t01.gif" style="height:13px; width:13px" /></td> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_l03.gif" style="height:13px; width:13px" /></td> </tr> <tr> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_t02.gif" style="height:13px; width:13px" /></td> <td><img id="img3" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/2_3_1.jpg" style="cursor:pointer; height:295px; width:520px" title="點圖觀看大圖" /></td> <td> </td> </tr> <tr> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_l02.gif" style="height:13px; width:13px" /></td> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_t03.gif" style="height:13px; width:13px" /></td> <td><img src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/bor_l04.gif" style="height:13px; width:13px" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td> <p> </p> </td> </tr> </tbody> </table> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> <div class="txt01" style="position: relative; left: 24px; width: 560px;"> <table style="table-layout:fixed; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td>統一注入參數的程式碼寫法:</td> </tr> </tbody> </table> </div> </div> <div> <table> <tbody> <tr> <td><img id="Img" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/2_3_2.jpg" style="height:188px; width:450px" /></td> </tr> <tr> <td> <p> </p> </td> </tr> </tbody> </table> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> </div> <div class="txt01" style="line-height: 24px; font-size: 15px; color: rgb(46, 124, 167); position: relative; left: 0px; width: 584px;"> <div class="txt01" style="position: relative; left: 24px; width: 560px;"> <table style="table-layout:fixed; word-break:normal; word-wrap:break-word"> <tbody> <tr> <td>取回傳送參數並且計算後顯示的方法:</td> </tr> </tbody> </table> </div> </div> <div> <table> <tbody> <tr> <td><img id="Img" src="http://www.pcschool.tv/scorm12/class/05183TC1/class800/05183tc1/05183tc1_m8_3/images/2_3_3.jpg" style="height:212px; width:450px" /></td> </tr> <tr> <td> <p> </p> </td> </tr> </tbody> </table> </div> </td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div>
上架
封面圖:
當前封面:
支援格式: JPG, PNG, GIF (最大 2MB)
更新電子書
返回列表