From b7f55ef0dbca314f5b40dd614561773aba3a324f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 14:03:10 +0900 Subject: [PATCH 1/8] =?UTF-8?q?ListItem=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/src/main/java/one/nem/lacerta/model/ListItem.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 model/src/main/java/one/nem/lacerta/model/ListItem.java 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..a2efa8ed --- /dev/null +++ b/model/src/main/java/one/nem/lacerta/model/ListItem.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.model; + +public class ListItem { +} From 19dfa070fd8a0e519d0d2b7e5cf49b62549c017c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 14:52:30 +0900 Subject: [PATCH 2/8] =?UTF-8?q?ListItem=E3=83=A2=E3=83=87=E3=83=AB?= =?UTF-8?q?=E4=BD=9C=E6=88=90,=20=E3=82=B3=E3=83=B3=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=83=A9=E3=82=AF=E3=82=BF=E5=AE=9A=E7=BE=A9,=20Getter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/model/ListItem.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/model/src/main/java/one/nem/lacerta/model/ListItem.java b/model/src/main/java/one/nem/lacerta/model/ListItem.java index a2efa8ed..c0120245 100644 --- a/model/src/main/java/one/nem/lacerta/model/ListItem.java +++ b/model/src/main/java/one/nem/lacerta/model/ListItem.java @@ -1,4 +1,35 @@ package one.nem.lacerta.model; +import android.graphics.drawable.Drawable; + public class ListItem { + + String title; + String description; + Drawable icon; + String itemId; + + public ListItem(String title, String description, Drawable icon, String itemId) { + this.title = title; + this.description = description; + this.icon = icon; + this.itemId = itemId; + } + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public Drawable getIcon() { + return icon; + } + + public String getItemId() { + return itemId; + } + } From 91bbca54ff51a74f6ec799dc119cd52f8a2a37d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 14:53:20 +0900 Subject: [PATCH 3/8] =?UTF-8?q?enum=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/src/main/java/one/nem/lacerta/model/ListItemType.java | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 model/src/main/java/one/nem/lacerta/model/ListItemType.java 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..3f0051c9 --- /dev/null +++ b/model/src/main/java/one/nem/lacerta/model/ListItemType.java @@ -0,0 +1,4 @@ +package one.nem.lacerta.model; + +public enum ListItemType { +} From 68f2ba3b591c07e43abb04969574c3ff8ba85b43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 14:55:06 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/model/ListItem.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/model/src/main/java/one/nem/lacerta/model/ListItem.java b/model/src/main/java/one/nem/lacerta/model/ListItem.java index c0120245..231438c8 100644 --- a/model/src/main/java/one/nem/lacerta/model/ListItem.java +++ b/model/src/main/java/one/nem/lacerta/model/ListItem.java @@ -4,18 +4,24 @@ import android.graphics.drawable.Drawable; public class ListItem { + // Properties + String title; String description; - Drawable icon; + ListItemType itemType; String itemId; - public ListItem(String title, String description, Drawable icon, String itemId) { + // Constructor + + public ListItem(String title, String description, ListItemType itemType, String itemId) { this.title = title; this.description = description; - this.icon = icon; + this.itemType = itemType; this.itemId = itemId; } + // Getter + public String getTitle() { return title; } @@ -24,8 +30,8 @@ public class ListItem { return description; } - public Drawable getIcon() { - return icon; + public ListItemType getItemType() { + return itemType; } public String getItemId() { From 17b2392fea5c7641871642f83a39f950b6ecfee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 15:01:17 +0900 Subject: [PATCH 5/8] =?UTF-8?q?drawable=E3=81=AB=E3=82=A2=E3=82=A4?= =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=82=922=E5=80=8B=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/ui/src/main/res/drawable/description-24px.xml | 10 ++++++++++ shared/ui/src/main/res/drawable/folder-24px.xml | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 shared/ui/src/main/res/drawable/description-24px.xml create mode 100644 shared/ui/src/main/res/drawable/folder-24px.xml 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 @@ + + + diff --git a/shared/ui/src/main/res/drawable/folder-24px.xml b/shared/ui/src/main/res/drawable/folder-24px.xml new file mode 100644 index 00000000..8febd807 --- /dev/null +++ b/shared/ui/src/main/res/drawable/folder-24px.xml @@ -0,0 +1,10 @@ + + + From 4ac03fd4f36d2a648507584e36f496cf64ffa1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 15:02:41 +0900 Subject: [PATCH 6/8] =?UTF-8?q?=E9=87=8D=E8=A4=87=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4,=20=E5=90=8D=E5=89=8D=E3=82=92=E7=B5=B1=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{description-24px.xml => description_24px.xml} | 0 shared/ui/src/main/res/drawable/folder-24px.xml | 10 ---------- 2 files changed, 10 deletions(-) rename shared/ui/src/main/res/drawable/{description-24px.xml => description_24px.xml} (100%) delete mode 100644 shared/ui/src/main/res/drawable/folder-24px.xml diff --git a/shared/ui/src/main/res/drawable/description-24px.xml b/shared/ui/src/main/res/drawable/description_24px.xml similarity index 100% rename from shared/ui/src/main/res/drawable/description-24px.xml rename to shared/ui/src/main/res/drawable/description_24px.xml diff --git a/shared/ui/src/main/res/drawable/folder-24px.xml b/shared/ui/src/main/res/drawable/folder-24px.xml deleted file mode 100644 index 8febd807..00000000 --- a/shared/ui/src/main/res/drawable/folder-24px.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - From f833465dc8c2afb76f62affe8aa58d0deac0fd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 15:03:44 +0900 Subject: [PATCH 7/8] =?UTF-8?q?:shared:ui=E3=82=92=E4=BE=9D=E5=AD=98?= =?UTF-8?q?=E9=96=A2=E4=BF=82=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/build.gradle | 2 ++ 1 file changed, 2 insertions(+) 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 From 5dcb27a2e9bbd15563fae23ccc36980bcb4e1aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 15:04:42 +0900 Subject: [PATCH 8/8] =?UTF-8?q?=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3ID?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/model/ListItemType.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/model/src/main/java/one/nem/lacerta/model/ListItemType.java b/model/src/main/java/one/nem/lacerta/model/ListItemType.java index 3f0051c9..65376a1c 100644 --- a/model/src/main/java/one/nem/lacerta/model/ListItemType.java +++ b/model/src/main/java/one/nem/lacerta/model/ListItemType.java @@ -1,4 +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; + } }