Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-deck.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2021-04-18 13:06:36 +0300
committerGitHub <noreply@github.com>2021-04-18 13:06:36 +0300
commit33c323483c88f3c7159ef3e8e079d7d2474d9a18 (patch)
tree8856240f42870139104b1d35f190b4942dcdf39f /app/src/main/res/layout
parentbfc99265b0ef01b1e3edb15dda996cada8f58bd0 (diff)
Cover images (#941)
* Add cover images to cards Signed-off-by: Stefan Niedermann <info@niedermann.it> * Add cover images to cards Signed-off-by: Stefan Niedermann <info@niedermann.it> * Add cover images to cards (also for compact mode) Signed-off-by: Stefan Niedermann <info@niedermann.it> * More decent cover images for compact mode Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/item_card_compact.xml137
-rw-r--r--app/src/main/res/layout/item_card_default.xml18
-rw-r--r--app/src/main/res/layout/item_card_default_only_title.xml12
3 files changed, 100 insertions, 67 deletions
diff --git a/app/src/main/res/layout/item_card_compact.xml b/app/src/main/res/layout/item_card_compact.xml
index e5e719bd9..2a8343690 100644
--- a/app/src/main/res/layout/item_card_compact.xml
+++ b/app/src/main/res/layout/item_card_compact.xml
@@ -10,87 +10,98 @@
android:layout_marginEnd="@dimen/spacer_2x"
android:layout_marginBottom="@dimen/spacer_1x"
android:focusable="true"
- app:cardElevation="@dimen/spacer_1qx"
- app:cardBackgroundColor="@color/bg_card">
+ app:cardBackgroundColor="@color/bg_card"
+ app:cardElevation="@dimen/spacer_1qx">
<LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="@dimen/spacer_1x"
- android:paddingBottom="@dimen/spacer_1x">
+ android:layout_height="wrap_content">
+
+ <FrameLayout
+ android:id="@+id/coverImages"
+ android:layout_width="50dp"
+ android:layout_height="match_parent"
+ tools:background="@color/bg_info_box" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:paddingStart="@dimen/spacer_2x"
- android:paddingEnd="@dimen/spacer_1x">
-
- <TextView
- android:id="@+id/card_title"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="4sp"
- android:layout_weight="1"
- android:textColor="?attr/colorAccent"
- android:textSize="18sp"
- tools:ignore="RtlSymmetry"
- tools:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l" />
-
- <ImageView
- android:id="@+id/not_synced_yet"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="8sp"
- android:contentDescription="@string/not_synced_yet"
- android:visibility="gone"
- app:srcCompat="@drawable/ic_sync_blue_24dp"
- tools:visibility="visible" />
+ android:orientation="vertical"
+ android:paddingTop="@dimen/spacer_1x"
+ android:paddingBottom="@dimen/spacer_1x">
<LinearLayout
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:paddingStart="@dimen/spacer_1hx"
- tools:ignore="RtlSymmetry">
+ android:paddingStart="@dimen/spacer_2x"
+ android:paddingEnd="@dimen/spacer_1x">
- <androidx.appcompat.widget.AppCompatTextView
- android:id="@+id/card_due_date"
+ <TextView
+ android:id="@+id/card_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4sp"
+ android:layout_weight="1"
+ android:textColor="?attr/colorAccent"
+ android:textSize="18sp"
+ tools:ignore="RtlSymmetry"
+ tools:text="Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l" />
+
+ <ImageView
+ android:id="@+id/not_synced_yet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/due_tomorrow_background"
- android:drawablePadding="@dimen/spacer_1hx"
- android:gravity="center"
- android:padding="@dimen/spacer_1hx"
- android:paddingEnd="@dimen/spacer_1x"
- android:textColor="@color/fg_secondary"
- app:drawableStartCompat="@drawable/calendar_blank_grey600_24dp"
- tools:text="tomorrow" />
+ android:layout_marginTop="8sp"
+ android:contentDescription="@string/not_synced_yet"
+ android:visibility="gone"
+ app:srcCompat="@drawable/ic_sync_blue_24dp"
+ tools:visibility="visible" />
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/spacer_1hx"
+ tools:ignore="RtlSymmetry">
+ <androidx.appcompat.widget.AppCompatTextView
+ android:id="@+id/card_due_date"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@drawable/due_tomorrow_background"
+ android:drawablePadding="@dimen/spacer_1hx"
+ android:gravity="center"
+ android:padding="@dimen/spacer_1hx"
+ android:paddingEnd="@dimen/spacer_1x"
+ android:textColor="@color/fg_secondary"
+ app:drawableStartCompat="@drawable/calendar_blank_grey600_24dp"
+ tools:text="tomorrow" />
+
+ </LinearLayout>
+
+ <ImageView
+ android:id="@+id/card_menu"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="?attr/selectableItemBackgroundBorderless"
+ android:contentDescription="@string/label_menu"
+ android:padding="@dimen/spacer_1hx"
+ android:tint="?attr/colorAccent"
+ app:srcCompat="@drawable/ic_menu" />
</LinearLayout>
- <ImageView
- android:id="@+id/card_menu"
- android:layout_width="wrap_content"
+ <it.niedermann.nextcloud.deck.ui.view.labellayout.CompactLabelLayout
+ android:id="@+id/labels"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="?attr/selectableItemBackgroundBorderless"
- android:contentDescription="@string/label_menu"
- android:padding="@dimen/spacer_1hx"
- android:tint="?attr/colorAccent"
- app:srcCompat="@drawable/ic_menu" />
- </LinearLayout>
-
- <it.niedermann.nextcloud.deck.ui.view.labellayout.CompactLabelLayout
- android:id="@+id/labels"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/spacer_1x"
- android:animateLayoutChanges="true"
- android:paddingStart="@dimen/spacer_2x"
- android:paddingEnd="@dimen/spacer_2x"
- app:flexWrap="nowrap"
- tools:layout_height="@dimen/avatar_size" />
+ android:layout_marginTop="@dimen/spacer_1x"
+ android:animateLayoutChanges="true"
+ android:paddingStart="@dimen/spacer_2x"
+ android:paddingEnd="@dimen/spacer_2x"
+ app:flexWrap="nowrap"
+ tools:layout_height="@dimen/avatar_size" />
+ </LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_card_default.xml b/app/src/main/res/layout/item_card_default.xml
index ad775fd1b..1b582c4e0 100644
--- a/app/src/main/res/layout/item_card_default.xml
+++ b/app/src/main/res/layout/item_card_default.xml
@@ -10,21 +10,33 @@
android:layout_marginEnd="@dimen/spacer_2x"
android:layout_marginBottom="@dimen/spacer_1x"
android:focusable="true"
- app:cardElevation="@dimen/spacer_1qx"
- app:cardBackgroundColor="@color/bg_card">
+ app:cardBackgroundColor="@color/bg_card"
+ app:cardElevation="@dimen/spacer_1qx">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:paddingTop="@dimen/spacer_1x"
android:paddingBottom="@dimen/spacer_1x">
<LinearLayout
+ android:id="@+id/coverImages"
+ android:layout_width="match_parent"
+ android:layout_height="130dp"
+ android:layout_rowWeight="1"
+ android:layout_columnWeight="1"
+ android:layout_marginBottom="@dimen/spacer_1x"
+ android:orientation="horizontal"
+ android:visibility="gone"
+ tools:background="@color/bg_info_box"
+ tools:visibility="visible" />
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="@dimen/spacer_2x"
+ android:paddingTop="@dimen/spacer_1x"
android:paddingEnd="@dimen/spacer_2x">
<TextView
diff --git a/app/src/main/res/layout/item_card_default_only_title.xml b/app/src/main/res/layout/item_card_default_only_title.xml
index a8db3d4e0..34df3439c 100644
--- a/app/src/main/res/layout/item_card_default_only_title.xml
+++ b/app/src/main/res/layout/item_card_default_only_title.xml
@@ -12,7 +12,17 @@
android:focusable="true"
app:cardElevation="@dimen/spacer_1qx"
app:cardBackgroundColor="@color/bg_card">
-
+
+ <LinearLayout
+ android:id="@+id/coverImages"
+ android:layout_width="match_parent"
+ android:layout_height="130dp"
+ android:layout_rowWeight="1"
+ android:layout_columnWeight="1"
+ android:layout_marginBottom="@dimen/spacer_1x"
+ android:orientation="horizontal"
+ android:visibility="gone"
+ tools:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"