Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java')
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java33
1 files changed, 0 insertions, 33 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java b/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java
index 6a13d8b7..b524e2fb 100644
--- a/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java
+++ b/app/src/main/java/it/niedermann/owncloud/notes/edit/BaseNoteFragment.java
@@ -370,39 +370,6 @@ public abstract class BaseNoteFragment extends BrandedFragment implements Catego
listener.close();
}
- @ColorInt
- protected static int getTextHighlightBackgroundColor(@NonNull Context context, @ColorInt int mainColor, @ColorInt int colorPrimary, @ColorInt int colorAccent) {
- if (isDarkThemeActive(context)) { // Dark background
- if (ColorUtil.INSTANCE.isColorDark(mainColor)) { // Dark brand color
- if (NotesColorUtil.contrastRatioIsSufficient(mainColor, colorPrimary)) { // But also dark text
- return mainColor;
- } else {
- return ContextCompat.getColor(context, R.color.defaultTextHighlightBackground);
- }
- } else { // Light brand color
- if (NotesColorUtil.contrastRatioIsSufficient(mainColor, colorAccent)) { // But also dark text
- return Color.argb(77, Color.red(mainColor), Color.green(mainColor), Color.blue(mainColor));
- } else {
- return ContextCompat.getColor(context, R.color.defaultTextHighlightBackground);
- }
- }
- } else { // Light background
- if (ColorUtil.INSTANCE.isColorDark(mainColor)) { // Dark brand color
- if (NotesColorUtil.contrastRatioIsSufficient(mainColor, colorAccent)) { // But also dark text
- return Color.argb(77, Color.red(mainColor), Color.green(mainColor), Color.blue(mainColor));
- } else {
- return ContextCompat.getColor(context, R.color.defaultTextHighlightBackground);
- }
- } else { // Light brand color
- if (NotesColorUtil.contrastRatioIsSufficient(mainColor, colorPrimary)) { // But also dark text
- return mainColor;
- } else {
- return ContextCompat.getColor(context, R.color.defaultTextHighlightBackground);
- }
- }
- }
- }
-
public interface NoteFragmentListener {
void close();