android:clearTaskOnLaunch=”true”最白話的解釋

來源:互聯網
上載者:User

 <activity android:name="com.cooliris.media.Gallery" android:label="@string/app_name"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
            android:configChanges="keyboardHidden|orientation"
            android:clearTaskOnLaunch="true" android:noHistory="false"
            android:stateNotNeeded="true">

......

網上也有很多高手解釋過這個屬性,不過沒太看懂,本人又請教了一下同事,終於明白了。

以galley3D 為例,在手機的home screen介面上有gallery3D的表徵圖,點擊表徵圖,進行相關操作,例如操作到要設定一幅圖片為案頭壁紙而剪下圖片,此時點擊了home 鍵,那麼回到home screen介面。此時gallery3D沒有真正結束,再次點擊表徵圖,會回到剪下圖片的介面,就是說這個activity是繼續活動,而不是第一次發起;只有按下back鍵時,才能真正結束當前的activity。

其實用gallery3D來舉例不是最能說明問題,因為Gallery3D只有一個activity。哈哈

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.