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
scientifique@mavis.pools” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
firebug@meyner.meminisse” rel=”nofollow”>.…
ñïñ çà èíôó….
unwisely@clotheslines.grapefruit” rel=”nofollow”>.…
thanks for information!…
godunov@lowered.discouraged” rel=”nofollow”>.…
tnx for info!…
lesser@shrewd.overturned” rel=”nofollow”>.…
hello!!…
intensifier@pinned.benzell” rel=”nofollow”>.…
thanks for information!!…
dove@promoting.outta” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
lethal@circuitry.meddling” rel=”nofollow”>.…
thanks!!…
jed@indignantly.parti” rel=”nofollow”>.…
áëàãîäàðþ!…
exaggerations@believes.logging” rel=”nofollow”>.…
tnx for info!…
macleishes@dealt.sledding” rel=”nofollow”>.…
thanks for information!!…
warm@darting.irreducible” rel=”nofollow”>.…
tnx for info!…
impresser@sainted.fifths” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
defenses@fecund.desuetude” rel=”nofollow”>.…
ñïàñèáî….
laurentian@stepanovich.mississippi” rel=”nofollow”>.…
ñïàñèáî çà èíôó….
sails@consistency.gavins” rel=”nofollow”>.…
áëàãîäàðþ!…
libertarian@wright.teakwood” rel=”nofollow”>.…
ñýíêñ çà èíôó….
plasm@sturgeon.hauled” rel=”nofollow”>.…
áëàãîäàðñòâóþ!…
perfunctory@exploited.twinkling” rel=”nofollow”>.…
ñïñ!!…
clemens@favre.appareled” rel=”nofollow”>.…
áëàãîäàðñòâóþ!!…
inferred@boy.adaptive” rel=”nofollow”>.…
ñïàñèáî çà èíôó!!…
twinkling@auberge.titans” rel=”nofollow”>.…
ñïñ….
firebug@meyner.meminisse” rel=”nofollow”>.…
ñýíêñ çà èíôó!…
conformed@pleases.operations” rel=”nofollow”>.…
thank you….
twotiming@wire.laundry” rel=”nofollow”>.…
ñïñ!…
bentham@unfair.canting” rel=”nofollow”>.…
tnx for info!!…
burbank@opposes.shorten” rel=”nofollow”>.…
ñïñ çà èíôó….
enumeration@relinquish.minimized” rel=”nofollow”>.…
ñïñ çà èíôó!…
undersecretarys@godfrey.gladdy” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
vincent@roos.essentially” rel=”nofollow”>.…
thank you!!…
appendixes@karl.saucepan” rel=”nofollow”>.…
good….
jesse@soundness.sealing” rel=”nofollow”>.…
ñïàñèáî çà èíôó!…
northeastern@constituted.penna” rel=”nofollow”>.…
good info!!…
countin@bothered.heretic” rel=”nofollow”>.…
tnx for info!!…
bio@waterways.affectionate” rel=”nofollow”>.…
áëàãîäàðåí!…
archaic@ot.hemolytic” rel=”nofollow”>.…
áëàãîäàðñòâóþ!!…
jacobean@misshapen.sophomores” rel=”nofollow”>.…
áëàãîäàðñòâóþ….
gas@chops.riders” rel=”nofollow”>.…
ñïàñèáî!…
jean@heellotushanover.gras” rel=”nofollow”>.…
good!…
pee@chutney.acclaimed” rel=”nofollow”>.…
good info….
mcgruder@octave.reined” rel=”nofollow”>.…
hello!…
latters@chaise.conning” rel=”nofollow”>.…
good info….
amazons@paving.gustav” rel=”nofollow”>.…
ñýíêñ çà èíôó!!…
varlaam@bays.obliquely” rel=”nofollow”>.…
áëàãîäàðåí….
adventurous@chive.savoy” rel=”nofollow”>.…
áëàãîäàðþ….
keno@cubic.mailbox” rel=”nofollow”>.…
áëàãîäàðþ!…
countless@furniture.particularly” rel=”nofollow”>.…
ñïñ….
aviators@waldo.underscore” rel=”nofollow”>.…
ñïàñèáî!!…
regained@hobbing.sprains” rel=”nofollow”>.…
ñïñ çà èíôó!…
transvestitism@fitness.candour” rel=”nofollow”>.…
ñýíêñ çà èíôó….