android - Pass data to previous fragment -


i have 2 fragments , b. going fragment fragment b using following method.

getactivity().getsupportfragmentmanager().begintransaction().replace(r.id.content_frame, new b()).addtobackstack(tag).commit(); 

now want send data fragment b fragment i.e previous fragment. can please give me idea how send data previous fragment.

thanks

check documentation fragments , communication.

do want pass info 1 fragment another? 1 fragment shouldn't know other fragments. make fragment b communicate activity through interface , make activity pass data fragment a


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -