mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Added color to nav menu items
This commit is contained in:
@@ -19,8 +19,11 @@ package eu.faircode.email;
|
||||
Copyright 2018-2021 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class NavMenuItem {
|
||||
private int icon;
|
||||
private Integer color;
|
||||
private int title;
|
||||
private String subtitle = null;
|
||||
private Integer count = null;
|
||||
@@ -43,6 +46,11 @@ public class NavMenuItem {
|
||||
this.longClick = longClick;
|
||||
}
|
||||
|
||||
NavMenuItem setColor(Integer color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
NavMenuItem setSubtitle(String subtitle) {
|
||||
this.subtitle = subtitle;
|
||||
return this;
|
||||
@@ -72,6 +80,10 @@ public class NavMenuItem {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
Integer getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
int getTitle() {
|
||||
return this.title;
|
||||
}
|
||||
@@ -114,4 +126,25 @@ public class NavMenuItem {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (object instanceof NavMenuItem) {
|
||||
NavMenuItem other = (NavMenuItem) object;
|
||||
return (this.icon == other.icon &&
|
||||
Objects.equals(this.color, other.color) &&
|
||||
this.title == other.title &&
|
||||
Objects.equals(this.subtitle, other.subtitle) &&
|
||||
Objects.equals(this.count, other.count) &&
|
||||
this.external == other.external &&
|
||||
this.warning == other.warning &&
|
||||
this.separated == other.separated);
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(icon, color, title, subtitle, count, external, warning, separated);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user