<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                > 編寫:[fastcome1985](https://github.com/fastcome1985) - 原文:[http://developer.android.com/training/basics/fragments/index.html](http://developer.android.com/training/basics/fragments/index.html) - 為了在Android上為用戶提供動態的、多窗口的交互體驗,我們需要將UI組件和[Activity](# "An activity represents a single screen with a user interface.")操作封裝成模塊進行使用,使得我們可以在[activity](# "An activity represents a single screen with a user interface.")中對這些模塊進行切入切出操作。可以用[Fragment](http://developer.android.com/intl/zh-cn/reference/android/app/Fragment.html)來創建這些模塊,Fragment就像一個嵌套的[activity](# "An activity represents a single screen with a user interface."),擁有自己的布局(layout)并管理自己的生命周期。 *0 一個fragment定義了自己的布局后,它可以在[activity](# "An activity represents a single screen with a user interface.")中與其他的fragment生成不同的組合,從而為不同的屏幕尺寸生成不同的布局(一個小的屏幕一次也許只能一個fragment,大的屏幕則可以顯示更多)。 - 本章將展示如何用fragment來創建動態界面,并在不同屏幕尺寸的設備上優化APP的用戶體驗。即使是運行著android1.6這樣老版本的設備,也都能夠繼續得到支持。 - 完整的Demo示例:[FragmentBasics.zip](http://developer.android.com/shareables/training/FragmentBasics.zip "FragmentBasics.zip") ### Lessons - [**創建一個fragment**](#) 學習如何創建一個fragment,以及實現其生命周期內的基本功能。 - [**構建有彈性的UI**](#) 學習在APP內,對不同的屏幕尺寸用fragment構建不同的布局。 - [**與其他fragments交互**](#) 學習fragment與[activity](# "An activity represents a single screen with a user interface.")及其他fragment間進行交互。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看