Android Question Modal AnotherDatePicker

Semen Matusovskiy

Well-Known Member
Licensed User
I placed anotherdatePicker (CustomView) inside ACToolBar (instead of Title).
Everything works, but the dialog is not modal and user can click something outside calendar. Exactly this I want to prevent.

I tried to create semi-transparent panel over whole screen and then to create "calendar". But this does not work at all.
To disable all views is interesting, but I have no idea how to enumerate all views (a lot of different parents).

Any ideas how to make modal datepicker or to disable / enable absolutelly all views?
 

Semen Matusovskiy

Well-Known Member
Licensed User
Exactly this way I mentioned in post #1. I know that this should work, because I already used this trick somehow.
But there is something exotic in concrete activity: 1) new panel covers "body", but not acToolBar (with NavDrawer); 2 - new panel does not receive touch events.
Something in Z-order or in touch listeners.

Maybe there is another way ?
 
Last edited:
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Erel --

See attached file. This is the Design Support demo code + some my statements at the bottom.

Additional panel can't cover an activity. In sample there is touch event, but there is no Click event. If to remove mypanel_touch, mypanel_click works.
Something similar happens in my app, but not absolutelly exactly (because activity has scrollview etc.)

It seems to me that troubles are relative to NavDrawer.
 

Attachments

  • NavigationView1_0.zip
    109.1 KB · Views: 192
Upvote 0
Top