[android-developers] Pass Object

2013-02-14 Thread sree android
Hi friends,

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

CityData tname = lcd.get(position);
CityFragment f2=new CityFragment();
Bundle b=new Bundle();
b.putSerializable(TNAME,tname);
Log.i(,Passed Data:+b.size());
f2.setArguments(b);

-- 
-- 
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.




[android-developers] Pass Object between Fragments

2013-02-14 Thread sree android
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.




[android-developers] Pass object from an activity to another?

2009-10-15 Thread Long

Hi,
  There is an activity which has an object. This activity(say A)
starts another activity(say B).
  Can B use some object in A?


Cheers.
Long

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---