Not sure if anyone here has helped work on Curtain...
# squarelibraries
c
Not sure if anyone here has helped work on Curtains (https://github.com/square/curtains) I have this interesting scenario I've gotten myself into because I'm using the U2020 pattern of having a debug drawer in my app. BUT my app supports Android TV and I've encountered some issues where the debug drawer actually gains focus and throws off everything. At this point, now I want a debug drawer but I don't want it to be in my view hierarchy. Currently contemplating if there's anyway that moving a debug drawer into another window would resolve this, but not sure if that's even possible. Appreciate anyones experience here as I don't really know where to even start. 😄
z
you can put your debug drawer in a dialog instead. i think we even started doing that recently for similar reasons
p
👋 I made Curtains
I’m not sure how Curtains related to your problem 🙂 . We definitely show our debug drawer in a dialog.
that was required for us because we started using dialogs more (for sheets display) and we wanted the debug drawer to be on top.
c
you can put your debug drawer in a dialog instead. i think we even started doing that recently for similar reasons
Oooh! That's good to hear that people have encountered a similar problem. From piwais message, are you using a bottom sheet dialog? Is a bottom sheet a separate window?
I’m not sure how Curtains related to your problem
I guess it's not... it just got me thinking if Curtains could be part of the solution for us!
that was required for us because we started using dialogs more (for sheets display) and we wanted the debug drawer to be on top. (edited)
Ah yes. That's actually a great side effect where your debug drawer can be on top of bottom sheets. Sorry about the fairly ignorant question. I'm super clueless about windows and such and just remembering reading the curtains blog post last week, and I got hit with this task today and my brain started thinking if this would somehow be a good fit. Converting my "debug drawer" into a "debug bottom sheet" seems like a neat idea though. I'm such an idiot. Didn't even think that that could be a solution as sticking a "debug drawer" in an "Alert dialog" was one line of thinking I went down but couldn't understand how that would work. 😂
Also. Small realization. I've been following @mp guide/talk for setting up a debug drawer for years... But by moving it to a bottom sheet... It actually really radically simplifies the setup.
p
Interesting, never heard of a bottom sheet drawer, but sounds like a cool idea. You probably still have the issue of layer order for if you are already showing dialogs though
c
@py oh. I thought a bottom sheet debug drawer is what you said you were doing. Any tips on how you go about "We definitely show our debug drawer in a dialog." I don't want to necessarily reinvent the wheel and it sounds like you all had the same motivation as me for getting rid of the drawer.
p
we simply create a dialog that doesn’t use the default dialog theme, and we set its content view to be the debug drawer content.
c
Nice. Simpler than I originally thought. Thank you so much!