mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 18:11:03 +01:00
Allow collapsing part of main navigation menu
This commit is contained in:
@@ -11,12 +11,19 @@ public class DrawerItem {
|
||||
private int resid;
|
||||
private String title;
|
||||
private boolean highlight;
|
||||
private boolean collapsible = false;
|
||||
|
||||
DrawerItem(long id) {
|
||||
this.id = id;
|
||||
this.layout = R.layout.item_drawer_separator;
|
||||
}
|
||||
|
||||
DrawerItem(long id, int resid) {
|
||||
this.id = id;
|
||||
this.menu = resid;
|
||||
this.layout = R.layout.item_drawer_expander;
|
||||
}
|
||||
|
||||
DrawerItem(long id, int icon, int resid) {
|
||||
this.id = id;
|
||||
this.menu = resid;
|
||||
@@ -43,6 +50,11 @@ public class DrawerItem {
|
||||
this.highlight = highlight;
|
||||
}
|
||||
|
||||
DrawerItem setCollapsible() {
|
||||
this.collapsible = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
int getLayout() {
|
||||
return this.layout;
|
||||
}
|
||||
@@ -76,4 +88,8 @@ public class DrawerItem {
|
||||
boolean getHighlight() {
|
||||
return this.highlight;
|
||||
}
|
||||
|
||||
boolean isCollapsible() {
|
||||
return this.collapsible;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user