3 回答

TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超11個(gè)贊
1創(chuàng)建Intent對(duì)象,并配置參數(shù),有那個(gè)activity跳轉(zhuǎn)到哪個(gè)activity
2在intent對(duì)象中進(jìn)行存放數(shù)據(jù),數(shù)據(jù)的格式是key-value形式
3啟動(dòng)跳轉(zhuǎn)
4進(jìn)入下一個(gè)到跳轉(zhuǎn)的activity中,并取得intent對(duì)象
5通過(guò)intent對(duì)象取得bundle對(duì)象,數(shù)據(jù)就在bundle對(duì)象中,然后通過(guò)key-value形式取得數(shù)據(jù)

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超10個(gè)贊
//
Intent intent = new Intent(this, Activity.class);
// intent.putExtra("name", 123);
//
Bundle bundle = new Bundle();
bundle.putBoolean("flag", true);
intent.putExtras(bundle);
//
startActivity(intent);
- 3 回答
- 0 關(guān)注
- 824 瀏覽
添加回答
舉報(bào)