Questions tagged «up-button»

5
使用navigationUpFromSameTask()从活动返回
我有两个活动A和B。第一次启动活动A时,它访问Intent传递给它的内容(因为Bundleis null,因为它应该是第一次通过),并相应地显示信息: CustInfo m_custInfo; ... protected void onCreate(Bundle savedInstanceState) { ... Bundle bundle = (savedInstanceState == null) ? getIntent().getExtras() : savedInstanceState; m_custInfo = (CustInfo) m_bundle.getSerializable("CustInfo"); if (m_custInfo != null ... } 第一次运行正常。该EditText控制和ListView正确地填写。 现在,单击列表中的项目时,活动B开始显示详细信息: m_custInfo = m_arrCustomers.get(pos); Intent intent = new Intent(A.this, B.class); intent.putExtra("CustInfo", m_custInfo); // CustInfo is serializable // printing …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.