Tommy,

 

You said in this

"Namely, the button text is reset when the user rotates there phone /
orientation changes occur.  This was done fairly simply with static
properties, and adding context to the Bundle."
 
What did you mean by "adding context to the Bundle?"
What is the Bundle?
 
Can you send a sample of adding context to the Bundle
 

___________________________________________________________

Ed Scott | Microsoft Certified Solutions Developer (MCSD)

www: http://www.gencode.com <http://www.gencode.com/>  

emaill: [email protected]
Location:  Earth, Milkyway Galaxy

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Tommy Hinrichs
Sent: Friday, March 18, 2011 1:18 AM
To: [email protected]
Subject: [mono-android] I Fixed a bug in ApiDemo

 

 
All,
 
I've been learning Monodroid.  I learn best by taking samples, and
understanding how they work.  
 
 
In the process I generally restructure them, refactor them, see that they
still work, etc to prove to myself that I understand how they work.
 
 
Going through this process with
https://github.com/mono/monodroid-samples/blob/master/ApiDemo/App/LocalServi
ce.cs I found / fixed the following bug:
 
 
Line 60: 
 
var notification = new Notification (Resource.Drawable.stat_sample, text,
System.Environment.TickCount);
 
The bug is that Notification expects milliseconds since epoch so we should
not be passing in tick count.
 
Please see
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
 
 
The fix is as follows:
 
var sinceEpoch = DateTime.UtcNow - new DateTime(1970, 1, 1);
var msSinceEpoch = (long)sinceEpoch.TotalMilliseconds;
 
var notification = new Notification(Resource.Drawable.stat_sample, text,
msSinceEpoch); 
 
 
I've also fixed what I would consider a bug in
https://github.com/mono/monodroid-samples/blob/master/Button/Button.cs
 
Namely, the button text is reset when the user rotates there phone /
orientation changes occur.  This was done fairly simply with static
properties, and adding context to the Bundle.
 
It was more code, so I didn't really think email was an appropriate venue.
 
I have a github profile, and I guess I could fork, fix, and request a pull
request. 
 
It seems like a lot of work for such small fixes. 
Is this the appropriate action?  
 
I've never contributed anything to an open source project, so I'm pretty new
to the process. 
 
 
Thanks
 
 
 
 
_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to