Android Question AnotherDatePicker - Not drawing on top

Discussion in 'Android Questions' started by shaffnert03, Oct 8, 2018.

  1. shaffnert03

    shaffnert03 Member Licensed 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?
     
  2. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed User

    Increase the .Elevation of the panel containing your datepicker.
     
  3. shaffnert03

    shaffnert03 Member Licensed 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.
     
  4. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed User

  5. shaffnert03

    shaffnert03 Member Licensed 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.
     
  6. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed User

    shaffnert03 likes this.
  7. walterf25

    walterf25 Well-Known Member Licensed User

    This thread should be moved to Questions.

    Walter
     
  8. shaffnert03

    shaffnert03 Member Licensed User

    Ahh sorry, you're right. I can't seem to edit or move it myself though; the only other options are B4A Class or Tool or nothing; something else I need to do to move it?
     
  9. shaffnert03

    shaffnert03 Member Licensed User

    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?
     
  10. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed User

    Unknown, @Erel would be required to answer further than I am able :)
     
  11. shaffnert03

    shaffnert03 Member Licensed 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.

    Code:
    holder.Elevation = 10dip
    Thanks again for pointing me in the direction to be able to figure it out!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice