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

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -