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

Use AppCompatResources #8404

Merged
merged 2 commits into from
May 30, 2022

Conversation

Isira-Seneviratne
Copy link
Member

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Use AppCompatResources's getColorStateList and getDrawable methods.

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

# Conflicts:
#	app/src/main/java/org/schabi/newpipe/fragments/list/playlist/PlaylistFragment.java
@triallax triallax added the codequality Improvements to the codebase to improve the code quality label May 18, 2022
@Stypox
Copy link
Member

Stypox commented May 22, 2022

It is not clear from here whether ColorStateList.valueOf(ContextCompat.getColor()) can be directly replaced by AppCompatResources.getColorStateList(). Could you provide some sources or more information about why you are sure this works?

@Isira-Seneviratne
Copy link
Member Author

It is not clear from here whether ColorStateList.valueOf(ContextCompat.getColor()) can be directly replaced by AppCompatResources.getColorStateList(). Could you provide some sources or more information about why you are sure this works?

Both methods accept a ColorRes parameter.

@Stypox
Copy link
Member

Stypox commented May 30, 2022

Ok, yes, I can confirm here

@Stypox Stypox closed this May 30, 2022
@Stypox Stypox reopened this May 30, 2022
@Stypox Stypox merged commit 75e5fe7 into TeamNewPipe:dev May 30, 2022
@sonarcloud
Copy link

sonarcloud bot commented May 30, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@AudricV AudricV changed the title Use AppCompatResources. Use AppCompatResources Jun 23, 2022
@Stypox Stypox mentioned this pull request Jun 24, 2022
3 tasks
@Isira-Seneviratne Isira-Seneviratne deleted the Use_AppCompatResources branch July 15, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codequality Improvements to the codebase to improve the code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants