Intent 和Bundle 传值

mac2026-08-20  2

传值: Intent intent = new Intent(); Bundle bundle = new Bundle(); bundle.putSerializable(“data”, (Serializable) pos_t_vip_info); intent.putExtras(bundle); 注:pos_t_vip_info数据类型应 implements Serializable public class pos_t_vip_info implements Serializable{} 取值: Intent mIntent = getIntent(); Bundle mBundle = mIntent.getExtras(); pos_t_vip_info vip_info = (pos_t_vip_info) bundle.getSerializable("ordering_bi_items");
最新回复(0)