-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for night mode #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@samtstern I updated the base for this PR to 2.1 |
@samtstern what are your thoughts on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are really small so in general LGTM. And thank you for all of the awesome screenshots.
I don't really know much about night mode though, is what you did in app
something that developers will have to do in their apps to enable night mode?
|
||
import com.squareup.leakcanary.LeakCanary; | ||
import com.squareup.leakcanary.RefWatcher; | ||
|
||
public class LeakCatcher extends Application { | ||
private RefWatcher mRefWatcher; | ||
|
||
static { | ||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels a little strange to do this in a class called 'LeakCatcher'. Also should we use 'MODE_NIGHT_SYSTEM' to respect the system setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samtstern Same, I was just being lazy. 😄
@samtstern As for the whole night mode thing, I've been really getting into AppCompat's coolness and I found these great resources which should clear things up for you: |
@samtstern Dang, I completely forgot about the night mode issue but the styling PR was the best desision ever! 😄 It just works™️
Here are a bunch of screenshots I took while testing, everything LGTM!












