-1
它不顯示任何錯誤,但是當我在手機上運行它時,應用程序每次都會崩潰!無法查看單選按鈕的值
`PizzaType.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pizzatype);
RadioButton rButton = (RadioButton) findViewById(R.id.radioButton);
String rText = rButton.getText().toString();
Intent intent = new Intent(Pizzatype.this, Overview.class);
intent.putExtra("Bbread","Brown Bread");
startActivity(intent);
String data = getIntent().getExtras().getString("Bbread");
}
Overview.java
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_overview);
String value= getIntent().getStringExtra("Bbread");
Intent intent = new Intent(this, Pizzatype.class);
intent.putExtra("Bbread", value);
startActivity(intent);
String data= getIntent().getStringExtra("Bbread");
}
你想實現什麼,異常的堆棧跟蹤是什麼? – lc2817 2014-09-28 23:57:25
我的應用程序就像你可以訂購比薩餅,所以你選擇你的麪包類型比你的澆頭,所以他們involoe單選按鈕和複選框,最後我必須顯示什麼用戶選擇訂單的概述像收到什麼你有 – 2014-09-29 00:01:56
和堆棧跟蹤? – lc2817 2014-09-29 00:05:44