updating data on first tab based on bundle info which is sent from the third tab by clicking on list item of third tab in android fragment -


  1. current situation : have 3 tab, tab1, tab2, tab3 created using fragmentactivity. have 3 fragment class each of them, , each of them display listview item in content. when click on item tab3, want change data of tab1 based on inputs item clicked. have tried below code

    fragmentactivitydaily mydetailfragment = new fragmentactivitydaily();         bundle bundle = new bundle();         bundle.putstring("key_detail", "hi");         mydetailfragment.setarguments(bundle);         fragmenttransaction fragmenttransaction = getfragmentmanager().begintransaction();         fragmenttransaction.add(r.id.pager, mydetailfragment);         fragmenttransaction.addtobackstack(null);         fragmenttransaction.commit();  
  2. with above code able change data , bundle info thorugh getarguement, not able view tab selected still tab3

            viewpager.setcurrentitem(tab1); 
  3. if use above line reloads fragment activty again overriding data have changed though above code.

  4. question: if use fragmenttransaction code how set tab tab1. or if set tab using setcurrentitem, how change data of tab1 sending budle info tab3.

i hope able explain issue... if yes please give me solution have searched alot on one..if not clear please let me know post full code well.

thanks*


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -