How to get String from Intent?
问题 I wrote some code to get text from the EditView, put it in the Intent Extras and set it in a TextView on other Activity. Here is my code from the sending Activity Intent intent = new Intent(MyLayoutActivity.this, LayoutForOneActivity.class); intent.putExtra("CaptionOne", String.valueOf(txt_caption1.getText())); startActivity(intent); And here is the code from my receiving Activity Intent intent1 = getIntent(); Bundle bundle = intent1.getExtras(); if (bundle != null) { caption = bundle