On Feb 27, 2013, at 12:26 PM, kruzo <[email protected]> wrote:
> In Android we have android.text.format.dateFormat.getDateFormat and
> getTimeFormat. But I can't find these classes in Monodroid.
Unfortunately they are not bound at this time. We are looking into binding them
in a future release.
In the meantime, you could use JNI to invoke the method.
IntPtr DateFormat_class;
using (var d = new Android.Text.Format.DateFormat ())
DateFormat_class = d.Class.Handle;
IntPtr DateFormat_getDateFormat = JNIEnv.GetStaticMethodID
(DateFormat_class, "getDateFormat",
"(Landroid/content/Context;)Ljava/text/DateFormat;");
IntPtr formatInstance = JNIEnv.CallStaticObjectMethod
(DateFormat_class, DateFormat_getDateFormat, new JValue (c));
// ...
JNIEnv.DeleteLocalRef (formatInstance);
Is there are particular DateFormat method you want to use?
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid