Android Question AnotherDatePicker - Not drawing on top

shaffnert03

Member
Licensed User
Longtime User
I'm updating an app and in the process moved to AnotherDatePicker 2.0. The screen I'm calling this from has two buttons though, and now when I click on the item the calendar pops up but with those two buttons still on top.

What do I search to get info on what gets drawn on top of what else? Or how do I move those buttons to the back while the calendar is up?
 

shaffnert03

Member
Licensed User
Longtime User
The date picker isn't in a Panel, it's included directly in the parent activity as a field. From my first look through I don't see anywhere in the settings for it an Elevation property. Does this solution still work in this case? And if so, where do I change the elevation?

The frustrating thing is, this worked fine with the 1.1 version of this library; it was only with the upgrade that this started happening.
 
Upvote 0

shaffnert03

Member
Licensed User
Longtime User
Would that work? The original item itself isn't the issue, it's the calendar that pops up that is, so would the panel on the original item actually alter that of the popup?

Also, that seems like a lot of unnecessary work to fix a problem that resulted from upgrading; at that point maybe more reasonable just to downgrade again. But I can't help but feel there's a better solution here if I understood how priority was determined in drawing.
 
Upvote 0

shaffnert03

Member
Licensed User
Longtime User
It's a change that occurred in the OS with the addition of Material Design, see: https://www.b4x.com/android/forum/t...d-on-the-activity-resolved.77260/#post-489429

As for how to correct it, if you lack access to the underlying library code, then you'll have to experiment or create your own control.
Thank you, this is very useful! And experimenting a bit more there are actually panes in the popup item.

That said, when I set the elevation of those panes to be high it doesn't seem to make a difference. I've gone as high as 30 to try and ensure I'm over the buttons, all with no effect. Is there something else required or something else I might be missing that would prevent this fix from working?
 
Upvote 0

shaffnert03

Member
Licensed User
Longtime User
Actually, I ended up solving it.

For any others with this problem, the panels saved in the layout aren't actually the ones you want to change. I added the below line in the AfterLoadLayout sub of the activity, after the initialization of the holder object obviously, and that made it work.

B4X:
holder.Elevation = 10dip

Thanks again for pointing me in the direction to be able to figure it out!
 
Upvote 0
Top