I put an ArrayList object into a bundle of my activity. Now in the next view I want to fill the content of these list elements into my view. How can I write something into my Edittext field in the onCreate method?
EditText comment;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_comment_picture);
if (savedInstanceState != null){
ArrayList<String> selectedPics = (ArrayList<String>) savedInstanceState.get("pics");
}
}
Thank you
Found your EditText you can with method findViewById(), like this
If you want add all items of selectedPics in one string, you can use thatcode:
Or, if you need set items in different lines and your EditText is multiline, use that code: