diff --git a/model/build.gradle b/model/build.gradle index cfd215dc..8546adc4 100644 --- a/model/build.gradle +++ b/model/build.gradle @@ -36,4 +36,6 @@ dependencies { // JGit implementation 'org.eclipse.jgit:org.eclipse.jgit:6.8.0.202311291450-r' + implementation project(":shared:ui") + } \ No newline at end of file diff --git a/model/src/main/java/one/nem/lacerta/model/ListItem.java b/model/src/main/java/one/nem/lacerta/model/ListItem.java new file mode 100644 index 00000000..231438c8 --- /dev/null +++ b/model/src/main/java/one/nem/lacerta/model/ListItem.java @@ -0,0 +1,41 @@ +package one.nem.lacerta.model; + +import android.graphics.drawable.Drawable; + +public class ListItem { + + // Properties + + String title; + String description; + ListItemType itemType; + String itemId; + + // Constructor + + public ListItem(String title, String description, ListItemType itemType, String itemId) { + this.title = title; + this.description = description; + this.itemType = itemType; + this.itemId = itemId; + } + + // Getter + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public ListItemType getItemType() { + return itemType; + } + + public String getItemId() { + return itemId; + } + +} diff --git a/model/src/main/java/one/nem/lacerta/model/ListItemType.java b/model/src/main/java/one/nem/lacerta/model/ListItemType.java new file mode 100644 index 00000000..65376a1c --- /dev/null +++ b/model/src/main/java/one/nem/lacerta/model/ListItemType.java @@ -0,0 +1,17 @@ +package one.nem.lacerta.model; + +public enum ListItemType { + + ITEM_TYPE_FOLDER(one.nem.lacerta.shared.ui.R.drawable.folder_24px), + ITEM_TYPE_DOCUMENT(one.nem.lacerta.shared.ui.R.drawable.description_24px); + + private int iconId; + + ListItemType(int iconId) { + this.iconId = iconId; + } + + public int getIconId() { + return iconId; + } +} diff --git a/shared/ui/src/main/res/drawable/description_24px.xml b/shared/ui/src/main/res/drawable/description_24px.xml new file mode 100644 index 00000000..fdf492d1 --- /dev/null +++ b/shared/ui/src/main/res/drawable/description_24px.xml @@ -0,0 +1,10 @@ + + +