It is currently Tue May 23, 2017 9:49 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 11:59 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
Is there/could there be a way to access http://developer.android.com/reference/android/app/DatePickerDialog.html?

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 12:09 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
There is. With the GW lib:
Code:
Include "GW.bas"
page = GwNewPage ()
GwAddTitleBar (page, "Date picker demo")
GwAddInputDate (page, "Input Date:", "")
GwRender (page)
Do
GwWaitAction$()
Until 0

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 1:08 pm 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
mougino wrote:
There is. With the GW lib: ...

Thanks Nicolas, I'll have a go. I did try GW_demo.bas for the 1st time today but just got a pale small circle in the centre of the screen and no action I could find, so rather gave up...

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 1:20 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
Hi Mike, yes this is a known issue on some devices (the HTML5 is not correctly supported).
To fix it: edit GW_demo.bas and add GwForceMode(1) right after the Include GW.bas

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 1:22 pm 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
Talking about that, I'm wondering if activating the hardware acceleration would solve this white screen with gray circle...
I'm working on a command to enable/disable acceleration. When it's complete, it would be interesting to have the GW demo tested on your device as is (without the GwForceMode(1))

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 1:25 pm 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
mjcoon wrote:
mougino wrote:
There is. With the GW lib: ...

Thanks Nicolas, I'll have a go. I did try GW_demo.bas for the 1st time today but just got a pale small circle in the centre of the screen and no action I could find, so rather gave up...

Mike.

OK, so I found the following in the "cheat sheet":
Quote:
GW_FORCE_MODE(1) %' use it if your device shows a white screen with gray circle in the middle

Inserted that in the demo and got some action.

But the date picker example gives:
Quote:
Index out of bounds
if idx <= ls then list.get 1, idx, e$

(I have guessed where the spaces should be to make it readable.)

But because it must be in the GW.bas I have no idea where the fault is or how it arises.

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Mon Jun 01, 2015 1:30 pm 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
mougino wrote:
Talking about that, I'm wondering if activating the hardware acceleration would solve this white screen with gray circle...
I'm working on a command to enable/disable acceleration. When it's complete, it would be interesting to have the GW demo tested on your device as is (without the GwForceMode(1))

I'd be happy to give it a go. But my device (Tesco Hudl, Android 4.2.2) is not very advanced and was rapidly superseded by a Hudl-2, so may well not have acceleration. Though the "Developer options" does mention "GPU rendering".

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Tue Jun 02, 2015 12:22 am 
Offline
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5518
Location: Paris, France
mjcoon wrote:
But the date picker example gives:
Quote:
Index out of bounds
if idx <= ls then list.get 1, idx, e$

(I have guessed where the spaces should be to make it readable.)

But because it must be in the GW.bas I have no idea where the fault is or how it arises.

Mike.

Hi Mike, you mean the "Input controls" part of the demo ? or my small date picker snippet ?
What version of the GW lib are you using ? (it's written at the top in "GW.bas") you should use v1.5

Nicolas

_________________
- Creator of the Android BASIC! Compiler


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Tue Jun 02, 2015 1:02 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
mougino wrote:
mjcoon wrote:
But the date picker example gives:
Quote:
Index out of bounds
if idx <= ls then list.get 1, idx, e$

(I have guessed where the spaces should be to make it readable.)

But because it must be in the GW.bas I have no idea where the fault is or how it arises.

Mike.

Hi Mike, you mean the "Input controls" part of the demo ? or my small date picker snippet ?
What version of the GW lib are you using ? (it's written at the top in "GW.bas") you should use v1.5

Nicolas

Hi Nicolas, as I said it was the date picker snippet. And I only downloaded GW.bas yesterday; I confirm it is V1.5.

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Date picker dialogue
Unread postPosted: Tue Jun 02, 2015 8:55 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 656
Location: UK
mougino wrote:
Hi Mike, yes this is a known issue on some devices (the HTML5 is not correctly supported).
To fix it: edit GW_demo.bas and add GwForceMode(1) right after the Include GW.bas

Nicolas

I found the date etc input fields in the demo. They confirm my impression from reading about HTML5 tags (http://www.w3schools.com/html/html_form_input_types.asp) that there is no guarantee of getting a "picker". (Which to me means a calendar display from which to choose a date.) Or in fact any help with date formats at all. Similarly entering a time needs some hint as to format, 12/24 hours etc.

In addition to referring to the "public DatePickerDialog" as a picker, the callback yields separate year, month and day integers, implying that parsing has taken place.

Mike.


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred