討論串[問題] 傳遞參數的用法bundle & intent
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
請問大家一個小問題,. 在傳遞Activity參數之間的程式寫法,. 我有在書上看過這樣的程式碼,. 單純用intent傳遞參數. Intent intent = new Intent();. intent.putExtra("KEY_MONTH", intMonth);. intent.putEx
(還有257個字)
內容預覽:
兩個東西就程式碼來講,其實是一樣的。. 簡單來說 Intent 裡面已經有個 Bundle 型態的變數,. 第一種作法利用 Intent.putXXXExtra,就是塞到這個 Bundle 之中。. 第二種作法先利用 Bundle 做了一堆事情,再塞到 Intent 裡,. 利用的就是 Bundle
(還有577個字)
首頁
上一頁
1
下一頁
尾頁