Skip to content
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

Fix #3782 : Made the project use Themes instead of Styles [Dark Mode Implementation]. #3851

Merged
merged 8 commits into from
Oct 7, 2021

Conversation

ayush0402
Copy link
Contributor

@ayush0402 ayush0402 commented Sep 27, 2021

Explanation

Fixes #3782
Most part of the existing styles.xml already followed suggested practices for themes.xml according to https://medium.com/androiddevelopers/android-styling-themes-vs-styles-ebe05f917578 with semantic naming for color resources.
Separated certain styles suited more for themes.xml from styles.xml.

Possible solution for further PRs :
Adding themes.xml and colors.xml under values-night and changing theme's parent to DayNight variant with changes under values-night for proper implementation of Dark Mode.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

@ayush0402
Copy link
Contributor Author

@rt4914 PTAL If this approach is acceptable.

Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayush0402 Nit changes suggested. @BenHenning Can you confirm if this approach is correct.

app/src/main/res/values-v21/themes.xml Outdated Show resolved Hide resolved
app/src/main/res/values/styles.xml Outdated Show resolved Hide resolved
app/src/main/res/values/themes.xml Outdated Show resolved Hide resolved
@rt4914 rt4914 assigned BenHenning and ayush0402 and unassigned rt4914 Sep 30, 2021
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a first pass, but I'd like to take a closer look tomorrow. I think this generally looks right, though.

scripts/assets/file_content_validation_checks.textproto Outdated Show resolved Hide resolved
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ayush0402. Took a closer look. PR generally LGTM, but had a couple of comments--PTAL.

app/src/main/res/values-v21/themes.xml Outdated Show resolved Hide resolved
app/src/main/res/values/themes.xml Outdated Show resolved Hide resolved
@BenHenning BenHenning assigned rt4914 and unassigned BenHenning Oct 6, 2021
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rt4914 rt4914 removed their assignment Oct 6, 2021
@oppiabot oppiabot bot added the PR: LGTM label Oct 6, 2021
@ayush0402
Copy link
Contributor Author

@BenHenning PTAL.

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ayush0402. This LGTM!

@BenHenning BenHenning merged commit 2c6aebd into oppia:develop Oct 7, 2021
@ayush0402 ayush0402 deleted the adding-themes-xml branch October 7, 2021 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the project use Themes instead of Styles [Dark Mode Implementation].
3 participants