diff options
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAdapter.java | 2 | ||||
-rw-r--r-- | app/src/main/res/drawable/ic_menu.xml | 8 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_card.xml | 95 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 2 |
4 files changed, 68 insertions, 39 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAdapter.java index fd43d58dd..52e501ac5 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAdapter.java @@ -225,6 +225,8 @@ public class CardAdapter extends RecyclerView.Adapter<CardAdapter.CardViewHolder TextView cardDueDate; @BindView(R.id.card_count_attachments) TextView cardCountAttachments; + @BindView(R.id.card_menu) + ImageView cardMenu; private CardViewHolder(View view) { super(view); diff --git a/app/src/main/res/drawable/ic_menu.xml b/app/src/main/res/drawable/ic_menu.xml new file mode 100644 index 000000000..194e7a378 --- /dev/null +++ b/app/src/main/res/drawable/ic_menu.xml @@ -0,0 +1,8 @@ +<!-- drawable/dots_vertical.xml --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:height="24dp" + android:width="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + <path android:fillColor="#757575" android:pathData="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" /> +</vector>
\ No newline at end of file diff --git a/app/src/main/res/layout/fragment_card.xml b/app/src/main/res/layout/fragment_card.xml index f036e6c38..8d96f046d 100644 --- a/app/src/main/res/layout/fragment_card.xml +++ b/app/src/main/res/layout/fragment_card.xml @@ -30,53 +30,70 @@ android:layout_height="wrap_content" android:layout_marginTop="8dp" /> - <LinearLayout + <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:paddingTop="8dp"> + android:layout_height="wrap_content"> - <ImageView - android:id="@+id/card_description_icon" + <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical" - android:layout_marginEnd="16dp" - android:layout_marginRight="16dp" - android:contentDescription="@string/label_card_description" - app:srcCompat="@drawable/ic_format_align_left_black_24dp" /> + android:orientation="horizontal" + android:paddingTop="8dp"> - <androidx.appcompat.widget.AppCompatTextView - android:id="@+id/card_due_date" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="12dp" - android:layout_marginRight="12dp" - android:background="@drawable/due_tomorrow_background" - android:drawablePadding="4dp" - android:gravity="center_vertical" - android:maxLines="1" - android:minLines="0" - android:padding="4dp" - app:drawableLeftCompat="@drawable/calendar_blank_grey600_24dp" - app:drawableStartCompat="@drawable/calendar_blank_grey600_24dp" - tools:text="in 16 days" /> + <ImageView + android:id="@+id/card_description_icon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:layout_marginEnd="16dp" + android:layout_marginRight="16dp" + android:contentDescription="@string/label_card_description" + app:srcCompat="@drawable/ic_format_align_left_black_24dp" /> - <androidx.appcompat.widget.AppCompatTextView - android:id="@+id/card_count_attachments" + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/card_due_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="12dp" + android:layout_marginRight="12dp" + android:background="@drawable/due_tomorrow_background" + android:drawablePadding="4dp" + android:gravity="center_vertical" + android:maxLines="1" + android:minLines="0" + android:padding="4dp" + app:drawableLeftCompat="@drawable/calendar_blank_grey600_24dp" + app:drawableStartCompat="@drawable/calendar_blank_grey600_24dp" + tools:text="in 16 days" /> + + <androidx.appcompat.widget.AppCompatTextView + android:id="@+id/card_count_attachments" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="12dp" + android:layout_marginRight="12dp" + android:drawablePadding="4dp" + android:gravity="center_vertical" + android:maxLines="1" + android:minLines="0" + android:padding="4dp" + app:drawableLeftCompat="@drawable/ic_folder_grey600_24dp" + app:drawableStartCompat="@drawable/ic_folder_grey600_24dp" + tools:text="1" /> + + </LinearLayout> + + <ImageView + android:id="@+id/card_menu" + android:contentDescription="@string/label_menu" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="12dp" - android:layout_marginRight="12dp" - android:drawablePadding="4dp" - android:gravity="center_vertical" - android:maxLines="1" - android:minLines="0" - android:padding="4dp" - app:drawableLeftCompat="@drawable/ic_folder_grey600_24dp" - app:drawableStartCompat="@drawable/ic_folder_grey600_24dp" - tools:text="1" /> + android:layout_marginTop="12dp" + android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" + android:visibility="gone" + app:srcCompat="@drawable/ic_menu"/> + </RelativeLayout> - </LinearLayout> </LinearLayout> </com.google.android.material.card.MaterialCardView>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c70ce7fce..7ebc573d2 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -66,4 +66,6 @@ <string name="attachment_count_max_value" translatable="false">+99</string> <string name="add_account">Add account</string> <string name="accounts">Accounts</string> + + <string name="label_menu">menu</string> </resources> |