lets say I have master/detail pattern using fragments, so as usual, the detail fragment would be inside new activity on a phone and on a tablet it would be inside the previous activity that list fragment is in also. Old stuff.
I have some actions to perform on the detail, like share, it would be actionbar item. Old stuff.
But now, I want to implement Contextual ActionBar, or a dialog, it doesnt really matter in my opinion, that would allow sharing right from the list.
My question is, where should I have that sharing code? I want to avoid duplicates. In my head, it cant really be a callback because the detail can be inside the dual activity or inside its single activity. Its just really confusing to me how should I do this.
Hope you get it. Thanks!