我使用此代码通过INT到机器人活动
Intent intent = new Intent(A.this, B.class);
intent.putExtra("selectedType", i);
startActivity(intent);
,然后再通过INT到下一个活动的活性乙收到此
Intent intent = new Intent();
int i = intent.getIntExtra("selectedType", 0);
Toast.makeText(getApplicationContext(), String.valueOf(i),
Toast.LENGTH_LONG).show();
但是当在该活动中,它总是显示0
很多正确答案是given..so请接受正确的答案。 –