Hi friends,

I have a dout on Fragments.How can i pass object from fragment to fragment.
Here My Code,

              /*/Sending Object.*
                CityData tname = lcd.get(position);//Here lcd is ArrayList
Object and CityData is POJO class.

                CityFragment f2=new CityFragment();//Fragment Class
                Bundle b=new Bundle();
                b.putSerializable("TNAME",tname);
                Log.i("","Passed Data:"+b.size());//Here Bundle length is 1.
                f2.setArguments(b);//this length is Zero.


            * //Retriveing Object*

         Bundle bun =getArguments();
        CityData cd=(CityData) bun.getSerializable("TNAME");//Here Value
Null.
        cityid=cd.getID();
        tv.setText(cd.getNameEnglish())

Please any Body solve my problum.How i pass Data between Fragments.

Thank you in Advance.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to