How to use 'bundle' instead of 'intent.putExtra()' in Fragment in Android

Viewed 2389

In Activity I have used the following code for passing the value to other Activity classes:

intent.putExtra("book_arr", book_arr);  // [putExtra(String *name*,Serializable *Value*)]

How to use like this code in Android Fragments?

I have tried the following code, but it is not supporting serialized value:

Bundle args =new Bundle();
args.putInt("book_arr", book_arr);

Thanks,

1 Answers
Related