Reputation: 42834
interfragment communication
from developers site between 2 fragments in single
activity i am passing data as setArguments
and getArguments
im-confused
My Questions::
Intents
& When should we use set-arguments
&
get-arguments
Upvotes: 0
Views: 525
Reputation: 5260
Intent is always good to send the primitives/Strings/Object etc. between two different activities while when we wants to send data between two different fragment it is good to send/pass them as Bundle args.
Intents are message passing system used for communication between two different activities while on the other hand the same communication is better with setting and getting bundle arguments in case of fragments.
Upvotes: 1
Reputation: 1422
Intents are used for communication between different activities and set-arguments are used for communication between two fragments. You can check this link- http://developer.android.com/training/basics/fragments/communicating.html#DefineInterface
Upvotes: 1