Hi,

I'm using Xamarin.Android 4.6.2 and have found a problem not in 4.6.1

My code to call a new activity looks like this

btnView.Click += delegate
            {
List<string> ids = recsToView.Select(t => t.ToString()).ToList();
                Intent i = new Intent(this, typeof(infoRecord));
                i.PutExtra("list", ids.Count > 1 ? true : false);
                i.PutExtra("sex", baseInfo.sex);
                i.PutStringArrayListExtra("IDs", ids);
                if (ids.Count == 1)
                    i.PutExtra("ID", ids [0]);
                StartActivity(i);
            };

Nothing out of the ordinary. If I put a debug point at the startactivity, the intent has everything in there correctly.

The receiving activity looks like this

bool isList = base.Intent.GetBooleanExtra("list", false);
baseInfo.sex = base.Intent.GetBooleanExtra("sex", true); // male
baseInfo.ID = base.Intent.GetIntExtra("ID", -1);
int f = base.Intent.GetIntExtra("ID", 0); // test
bool all = base.Intent.GetBooleanExtra("all", false);

Again, a breakpoint shows {ID=6445, sex=false, list=false, IDs={6445}}, so the values are there and showing correctly, they're just not being read into the variables.

Any ideas on what is going on here or if it's a bug I've found?

Paul
--
"Space," it says, "is big. Really big. You just won't believe how vastly, hugely, mindbogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space, listen..."
Hitch Hikers Guide to the Galaxy, a truly remarkable book!

_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to