LWUIT DateField and other bits

We missed having a DateField in LWUIT, the Calendar is a great start but it looked a little strange on some phones and we needed something simpler, not to mention a time field.

To do this we extended the TextArea class to create our own MobrizDateField.  When the user clicks on this the system fires up a standard LCDUI form with a DateField on it (DateForm).  The user can then use the native time/date features of the phone to complete the date/time

To tell LWUIT to intercept the DateField calls  we extended the GameCanvasImplementation to create our own MobrizMidpImplementation.  This overrides the editString method and launches the DateForm if the MobrizDateField is being used. We needed a MobrizImplementationFactory to deliver this too.

To tell LWUIT to use the new MobrizMidpImplementation add the following to your code where you initailise the UI.


..
ImplementationFactory.setInstance(new MobrizImplementationFactory());
Display.init(this.mobrizMidlet);
..

Use the new MobrizDateField just like a TextArea:


..
MobrizDateField timeField = new MobrizDateField(dtLong + "", 10,MobrizDateField.TIME, "");
form.addComponent(timeField) ;
..

Things to note:

  • The MobrizDateField takes a string or a long expressed as a string in the constructor .. this is a bit crap but suited us for our app. you may want to change it match to LCDUI datefield exactly.
  • The MobrizDateField actually extends MobrizTextArea which is a TextArea that responds to any key press.

Would welcome any comments or improvments!!!

As ever this code is provided without warranty – user at you own risk.

Here is the source

449 Responses to “LWUIT DateField and other bits”

  1. NICK says:

    Purchase@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..

    Buygeneric drugs…

  2. RUSSELL says:

    Order@Generic.Acai” rel=”nofollow”>..

    Buywithout prescription…

  3. SALVADOR says:

    Order@Acai.Without.Prescription” rel=”nofollow”>…

    Buynow…

  4. RENE says:

    Buy@Coral.Calcium.Online” rel=”nofollow”>.…

    Buygeneric drugs…

  5. ALFRED says:

    Order@Cheap.Coral.Calcium” rel=”nofollow”>…

    Buynow…

  6. BRIAN says:

    Order@Discount.Coral.Calcium” rel=”nofollow”>..

    Buygeneric drugs…

  7. KURT says:

    Purchase@Cheap.Abana” rel=”nofollow”>..

    Buyno prescription…

  8. ADRIAN says:

    Purchase@Abilify.Without.Prescription” rel=”nofollow”>.

    Buynow…

  9. FREDERICK says:

    Buy@Coral.Calcium.Online” rel=”nofollow”>..…

    Buywithout prescription…

  10. LOUIS says:

    Buy@Cheap.Coral.Calcium” rel=”nofollow”>..

    Buyno prescription…

  11. CECIL says:

    Order@Coral.Calcium.Online” rel=”nofollow”>.

    Buygeneric meds…

  12. SIDNEY says:

    Buy@Abana.Online” rel=”nofollow”>.

    Buynow…

  13. LLOYD says:

    Order@Abana.Online” rel=”nofollow”>.

    Buygeneric drugs…

  14. NATHANIEL says:

    Purchase@Cheap.Abilify” rel=”nofollow”>.

    Buyit now…

  15. EARL says:

    Get@Abilify.Online” rel=”nofollow”>..

    Buygeneric drugs…

  16. JULIAN says:

    Order@Abilify.Without.Prescription” rel=”nofollow”>.

    Buynow…

  17. JUAN says:

    Purchase@Generic.Abilify” rel=”nofollow”>…

    Buywithout prescription…

  18. DAVID says:

    Cheap@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>.

    Buygeneric drugs…

  19. LANCE says:

    Buy@Acai.Online” rel=”nofollow”>…

    Buyno prescription…

  20. DENNIS says:

    Buy@Acai.Online” rel=”nofollow”>.

    Buyit now…

  21. SAMUEL says:

    Buy@Cheap.Acai” rel=”nofollow”>…

    Buygeneric drugs…

  22. GUY says:

    Buy@Cheap.Acai” rel=”nofollow”>.

    Buywithout prescription…

  23. FELIX says:

    Buy@Discount.Acai” rel=”nofollow”>…

    Buyit now…

  24. JEFFREY says:

    Order@Acai.Online” rel=”nofollow”>…

    Buynow it…

  25. DONALD says:

    Order@Acai.Online” rel=”nofollow”>…

    Buyit now…

  26. ALFRED says:

    Order@Discount.Acai” rel=”nofollow”>…

    Buynow…

  27. GARY says:

    Order@Discount.Acai” rel=”nofollow”>..

    Buywithout prescription…

  28. WILLIE says:

    Purchase@Discount.Acai” rel=”nofollow”>…

    Buygeneric drugs…

  29. KELLY says:

    Cheap@Acai.Online” rel=”nofollow”>.

    Buygeneric meds…

  30. MARTIN says:

    Buy@Generic.Acai” rel=”nofollow”>.

    Buyit now…

  31. VICTOR says:

    Order@Acai.Without.Prescription” rel=”nofollow”>.

    Buygeneric drugs…

  32. HARRY says:

    Cheap@Acai.500mg” rel=”nofollow”>..…

    Buygeneric pills…

  33. RICK says:

    Order@Energy.Boost.Online” rel=”nofollow”>.…

    Buygeneric drugs…

  34. BYRON says:

    Order@Cheap.Energy.Boost” rel=”nofollow”>.…

    Buynow it…

  35. MATHEW says:

    Purchase@Cheap.Energy.Boost” rel=”nofollow”>.…

    Buyno prescription…

  36. RUBEN says:

    Buy@Cheap.Accupril” rel=”nofollow”>.…

    Buygeneric meds…

  37. BILLY says:

    Order@Discount.Accupril” rel=”nofollow”>.…

    Buygeneric drugs…

  38. NATHAN says:

    Order@Accutane.Online” rel=”nofollow”>.…

    Buynow it…

  39. BOB says:

    Buy@Accutane.Without.Prescription” rel=”nofollow”>.…

    Buygeneric drugs…

  40. SAM says:

    Generic@Accutane.10mg.20mg.Without.Prescription” rel=”nofollow”>.…

    Buynow it…

  41. WILLIAM says:

    Buy@Aciphex.Online” rel=”nofollow”>.…

    Buygeneric pills…

  42. CARL says:

    Buy@Cheap.Aciphex” rel=”nofollow”>.…

    Buygeneric meds…

  43. ADAM says:

    Buy@Generic.Aciphex.Without.Prescription” rel=”nofollow”>.…

    Buyno prescription…

  44. ENRIQUE says:

    Purchase@Actonel.Without.Prescription” rel=”nofollow”>..

    Buyit now pqh…

  45. FRED says:

    Cheap@Actonel.Without.Prescription” rel=”nofollow”>…

    Buydrugs without prescription xji…

  46. DANNY says:

    Cheap@Actonel.Without.Prescription” rel=”nofollow”>…

    Buygeneric pills cvz…

  47. FRANK says:

    Purchase@Generic.Actonel.35mg” rel=”nofollow”>.

    Buygeneric meds qwt…

  48. KYLE says:

    Buy@Actoplus.Met.Online” rel=”nofollow”>…

    Buygeneric drugs vwv…

  49. HERBERT says:

    Buy@Cheap.Actoplus.Met” rel=”nofollow”>.

    Buynow it uvp…

Leave a Reply

You must be logged in to post a comment.