Android Question [answered/solved] Date picking issue

rabbitBUSH

Well-Known Member
Licensed User
I am using the library developed by @Alexander Stolte (AS_DatePicker 1.21 with ASViewPager 2.00) and am encountering some strange behaviour.

I have run the example offered by Alexander and it runs properly. Which means I cannot explain why I have the issues this example (hopefully) will display.

In the example I have put a label under the date picker which describes what I experience.

This is a very simple library to use - so this very simple brain has not done something or other and that is causing the hassle.

[I would be DEEPLY cautious about saying there is something wrong in the library - Really not going there.]

Would be happy to receive comments from members who spot what is going wrong here - been banging at this for some time.

I have exported this ZIP file from the Files->Export as zip (I 7-Zipped manually (and it ended up too big to upload) so I hope everything is here as needed by readers.

Thanks everyone
 

Attachments

  • testdatepicking.zip
    38.6 KB · Views: 53

teddybear

Well-Known Member
Licensed User
The problem is in your B4XMainPage.
You should use B4XPages.AddPage to add a new page rather than B4XPages.AddPageAndCreate
B4X:
B4XPages.AddPage("add", newb)
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
The problem is in your B4XMainPage
Hmmmmm thanks - will make the change and check on the difference between AddPage and AddPageAndCteate. Interestingly until I put the date picker in - that didn't appear to be causing any issues.

Thanks for giving me a little of your time.....
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
the difference between AddPage and AddPageAndCteate
The difference are, if you call AddPageAndCteate then the page is already created in the background. The problem is that the page is not visible and the native scrollview does not like that. You can easily recreate the whole thing by adding an xcustomlistview to a panel but setting this panel to visible = false and then trying to add items. You will see that this does not work. And so it is with my library. This has been discussed a few times here in the forum.

The view must not have an invisible parent.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
The difference are,
Thanks for the explanation....and guidance. I unfortunately did not hit the correct question last night so those discussions didn't appear. I will try these solutions tonight then mark this solved when achieved.

Thank you again for your assistance and for your work 🙏 when I can afford it again I will contribute to the coffees.
🖖
 
Upvote 0
Top