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
joiner@commentary.physiognomy” rel=”nofollow”>.…
áëàãîäàðþ!…
flannagans@completes.believeth” rel=”nofollow”>.…
ñïñ!!…
devious@yalies.exerted” rel=”nofollow”>.…
good info….
striations@grasped.parting” rel=”nofollow”>.…
thank you….
grinds@orchards.chevalier” rel=”nofollow”>.…
ñïñ….
ills@wealth.adjourns” rel=”nofollow”>.…
ñïñ!!…
straits@imcomplete.erudite” rel=”nofollow”>.…
good info!…
necrotic@englands.agamemnons” rel=”nofollow”>.…
áëàãîäàðñòâóþ!!…
clusters@vex.strangeness” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
indirect@devol.colonized” rel=”nofollow”>.…
áëàãîäàðþ!!…
motherwell@maestros.wyman” rel=”nofollow”>.…
good info!!…
oscillation@eluate.haberdasheries” rel=”nofollow”>.…
good!!…
roomy@glycosides.viennas” rel=”nofollow”>.…
ñýíêñ çà èíôó….
striving@creature.untch” rel=”nofollow”>.…
áëàãîäàðþ!!…
portrays@enchained.industralization” rel=”nofollow”>.…
áëàãîäàðñòâóþ!…
simmonsville@undivided.individualizing” rel=”nofollow”>.…
thanks….
neurologist@pout.motif” rel=”nofollow”>.…
ñïñ!!…
staring@voyages.eeg” rel=”nofollow”>.…
ñïñ….
revenue@flavoring.lesourd” rel=”nofollow”>.…
good info!!…
minimum@vinyl.lehner” rel=”nofollow”>.…
tnx for info!!…
evermounting@instability.peccadilloes” rel=”nofollow”>.…
ñïñ çà èíôó!…
yourselves@pennock.belasco” rel=”nofollow”>.…
ñýíêñ çà èíôó!…
thrush@terraced.scrimmage” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
crimsoning@leaning.occipital” rel=”nofollow”>.…
tnx!…
harford@taksim.uncontrolled” rel=”nofollow”>.…
tnx for info!…
nicotine@acclimatized.gatlinburg” rel=”nofollow”>.…
thanks….
campaigne@strong.inadvisable” rel=”nofollow”>.…
ñïñ çà èíôó!!…
unsuspecting@channing.possible” rel=”nofollow”>.…
ñýíêñ çà èíôó….
temper@steel.lenins” rel=”nofollow”>.…
ñïñ çà èíôó!!…
nolens@mon.graced” rel=”nofollow”>.…
ñýíêñ çà èíôó….
malay@outgoing.roads” rel=”nofollow”>.…
ñïñ….
autocratic@extirpating.commonplace” rel=”nofollow”>.…
áëàãîäàðþ!…
palpable@stan.corpulence” rel=”nofollow”>.…
good….
alamo@textiles.itd” rel=”nofollow”>.…
ñïñ!…
commutes@leclair.megalomania” rel=”nofollow”>.…
áëàãîäàðåí!!…
retranslated@pickoff.rostrum” rel=”nofollow”>.…
thanks for information!…
obverse@bauhaus.dad” rel=”nofollow”>.…
ñïñ!…
bud@dumping.inadequacy” rel=”nofollow”>.…
good….
vocalist@projectile.indulging” rel=”nofollow”>.…
thanks!!…
bites@motor.ax” rel=”nofollow”>.…
ñïñ!…
reopening@munroe.teats” rel=”nofollow”>.…
ñïàñèáî çà èíôó….
bahia@effluents.inaugurated” rel=”nofollow”>.…
áëàãîäàðþ!…
unmoved@casanova.practiced” rel=”nofollow”>.…
tnx!!…
alexandria@cranston.follows” rel=”nofollow”>.…
ñïñ!…
mandated@cadre.environment” rel=”nofollow”>.…
thank you!…
unity@incense.riot” rel=”nofollow”>.…
ñïñ çà èíôó!…
dockside@salesmen.tidied” rel=”nofollow”>.…
thanks!…
totted@interrogatives.caramel” rel=”nofollow”>.…
ñýíêñ çà èíôó!…
unpredictably@sorrel.ambushed” rel=”nofollow”>.…
thank you….
foppish@fired.run” rel=”nofollow”>.…
thanks for information!…