java - How to send parameters to existing hidden fragment from activity -


i have mainactivity navigationdrawer. when click on navigation, new fragment created. clicking on next navigation point, old removed , new added transaction.

sometimes open new window within navigation point. in case hide old fragment , add new fragment. problem:

i have fragmenta edittext. when click on edittext field new fragmentb opened. old fragmenta hidden. fragmentb has list items. when click on 1 of items want close fragmentb , fill value of listitem in edittext of fragmenta. tried many things, it's not working.
transfer listitem information mainactivity communicator interface. works. however, way mainactivity fragmenta problem.
can't put item value bundle arguments because fragment there. tried call public function exists in fragmenta, everytime want call function mainactivity not possible, because there no such function. have no idea updating edittext in fragmenta , hope help.

sorry bad english.

ok let me see if understand, have mainactivity , 2 fragments , b. when someting in mainactivity fires transaction, want hide fragment b, , show fragment a. also, transfer info lives in fragment b fragment a, right?

then, understood have info in mainactivity transfered b using interface (which correct way it). can't pass info fragment a.

before commit transaction, had instantiate fragment a, after commit can call public method in send info, right? if that's not working it's because may you're trying send before exists on screen.

anyway, try share code, figure out happens.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -