Passing values between Activities using MonoDroid
Posted by: Wallace B. McClure,
on 08 Feb 2011 |
View original | Bookmarked: 0 time(s)
Been doing some work in MonoDroid and found that I needed to pass a
user entered value from on Activity to another Activity in MonoDroid.
Here's how I did it.
In my sending Activity, I need to take some user user entered data and send it to my second activity. Here is the code:
string UserId = Convert.ToString(et.Text); if (!String.IsNullOrEmpty(UserId)) { Intent i = new Intent(); i.SetClass(this, typeof(CustomList)); i.AddFlags(ActivityFlags.NewTask); i.PutExtra("TwitterId", UserId); StartActivity(i); }
In...