Hi Sree,
          U need interface for sending data between two fragments.
http://manishkpr.webheavens.com/android-passing-data-between-fragments/
see this example.. it ll helps u...

On Feb 15, 10:11 am, sree android <android.sreeni...@gmail.com> wrote:
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
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 android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to