Adapter clean ups
This commit is contained in:
parent
61d8b8179b
commit
98dcdf2d47
55 changed files with 811 additions and 1147 deletions
|
|
@ -52,4 +52,8 @@ public class ColorUtil {
|
|||
public static boolean useDarkTextColorOnBackground(int backgroundColor) {
|
||||
return (Color.red(backgroundColor) * 0.299 + Color.green(backgroundColor) * 0.587 + Color.blue(backgroundColor) * 0.114) > 186;
|
||||
}
|
||||
|
||||
public static int getTextColorForBackground(int backgroundColor) {
|
||||
return (Color.red(backgroundColor) * 0.299 + Color.green(backgroundColor) * 0.587 + Color.blue(backgroundColor) * 0.114) > 186 ? Color.BLACK : Color.WHITE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue