Android - Communicating from Activity to fragment that it hosts -


currently have been diving fragment world: http://developer.android.com/guide/components/fragments.html#communicatingwithactivity

i understand creating listener in fragment , implementing in activity hosts fragment great way communicate fragment activity, how communicate activity fragment? listener? perhaps don't understand listener doing. topic explaining how communicate activity fragment appreciated!

p.s. converting activity (b) made fragment. use intent.putextra("value") activity before starting activity b looking replace... doesn't @ thought i'd try , put perspective doing.

i may have found solution, lol. i'll checks make sure works , confirm later.

@override public view oncreateview(layoutinflater inflater, viewgroup container,     bundle savedinstancestate) {          bundle b = getactivity().getintent().getextras();         wid = b.getstring("wid");         rid = b.getstring("rid");         view view = inflater.inflate(r.layout.categoryfragment, container, false); return view; } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -