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. OTIS says:

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

    Buydrugs without prescription pls…

  2. BOBBY says:

    Cheap@Actos.15mg.30mg” rel=”nofollow”>..

    Buygeneric drugs aoq…

  3. DALE says:

    Generic@Actos.15mg.30mg.Without.Prescription” rel=”nofollow”>…

    Buygeneric pills isf…

  4. SHANNON says:

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

    Buynow it xvf…

  5. CALVIN says:

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

    Buydrugs without prescription pwx…

  6. MIKE says:

    Order@Cheap.Adalat” rel=”nofollow”>…

    Buygeneric pills rsz…

  7. CORY says:

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

    Buyit now bmf…

  8. WILLARD says:

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

    Buygeneric pills lue…

  9. KYLE says:

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

    Buygeneric meds rjn…

  10. SIDNEY says:

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

    Buygeneric drugs fmo…

  11. MELVIN says:

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

    Buywithout prescription yen…

  12. MITCHELL says:

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

    Buydrugs without prescription faj…

  13. VINCENT says:

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

    Buyit now ojb…

  14. MARION says:

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

    Buygeneric drugs mby…

  15. RONALD says:

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

    Buygeneric drugs itj…

  16. JOEL says:

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

    Buyno prescription wkp…

  17. JERRY says:

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

    Buydrugs without prescription vrg…

  18. BRYAN says:

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

    Buygeneric drugs nih…

  19. GLENN says:

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

    Buyno prescription tao…

  20. CHRISTOPHER says:

    Buy@Energy.Boost.Online” rel=”nofollow”>..

    Buynow it cey…

  21. MARION says:

    Order@Discount.Energy.Boost” rel=”nofollow”>..

    Buyno prescription gdt…

  22. BRUCE says:

    accupril@and.muscle.pain” rel=”nofollow”>…

    Buynow it zdg…

  23. HOMER says:

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

    Buyit now irl…

  24. PHILIP says:

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

    Buygeneric meds svb…

  25. MARVIN says:

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

    Buynow it lmg…

  26. LEWIS says:

    Purchase@Generic.Accutane” rel=”nofollow”>.

    Buygeneric drugs axm…

  27. JASON says:

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

    Buywithout prescription ccw…

  28. DALE says:

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

    Buyit now knc…

  29. LEROY says:

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

    Buyit now sge…

  30. ALEX says:

    Purchase@Discount.Acomplia” rel=”nofollow”>..

    Buygeneric drugs ajd…

  31. JEREMIAH says:

    Purchase@Discount.Acomplia” rel=”nofollow”>.

    Buynow tqa…

  32. FRED says:

    Purchase@Discount.Acomplia” rel=”nofollow”>.

    Buygeneric drugs mml…

  33. CHRIS says:

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

    Buygeneric drugs nvr…

  34. MILTON says:

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

    Buydrugs without prescription hak…

  35. CARLOS says:

    Purchase@Actonel.Online” rel=”nofollow”>…

    Buygeneric drugs vbr…

  36. VINCENT says:

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

    Buydrugs without prescription xab…

  37. DWIGHT says:

    Buy@Generic.Actonel.Without.Prescription” rel=”nofollow”>.

    Buygeneric drugs ouw…

  38. AARON says:

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

    Buyno prescription jwi…

  39. RICARDO says:

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

    Buygeneric drugs hwi…

  40. FRED says:

    Purchase@Advair.Online” rel=”nofollow”>..

    Buyno prescription jui…

  41. BILLY says:

    Get@Aggrenox.Online” rel=”nofollow”>…

    Buynow fjl…

  42. RENE says:

    Order@Cheap.Albenza” rel=”nofollow”>…

    Buynow it sxk…

  43. BRENT says:

    abilify@and.weight.gain” rel=”nofollow”>…

    Buyno prescription…

  44. ANGELO says:

    aciphex@cancer.buy” rel=”nofollow”>..

    Buygeneric drugs…

  45. BARRY says:

    risperdal@vs.abilify” rel=”nofollow”>.

    Buygeneric drugs…

  46. REX says:

    abilify@and.sleep.issues” rel=”nofollow”>..

    Buydrugs without prescription…

  47. BRYAN says:

    can@you.get.acai.berries.in.the.grocery.store” rel=”nofollow”>.

    Buydrugs without prescription…

  48. RICHARD says:

    allegra@generic.purchase” rel=”nofollow”>…

    Buynow…

  49. JOHNNY says:

    aloe@vera.juice.for.sale” rel=”nofollow”>..

    Buyit now…

Leave a Reply

You must be logged in to post a comment.