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:
authorstefan-niedermann <info@niedermann.it>2019-11-16 13:05:44 +0300
committerstefan-niedermann <info@niedermann.it>2019-11-16 13:05:44 +0300
commitb4ca66f8f97eeacfcd5e1f6f77a44a8a3aa5ff3b (patch)
treedb6004f5f089707b7458184c661eb641f178ac0b /app/src/main
parent0c5ad621a94a0bd99ca8f2bca9302fedf56af81b (diff)
#211 Add / Delete attachments
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAttachmentsFragment.java12
-rw-r--r--app/src/main/res/layout/fragment_card_edit_tab_attachments.xml20
2 files changed, 27 insertions, 5 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAttachmentsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAttachmentsFragment.java
index c8c5c6324..d8f81eb78 100644
--- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAttachmentsFragment.java
+++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardAttachmentsFragment.java
@@ -7,9 +7,13 @@ import android.view.ViewGroup;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import com.google.android.material.snackbar.Snackbar;
+
import java.util.Objects;
import butterknife.BindView;
@@ -27,6 +31,10 @@ import static it.niedermann.nextcloud.deck.ui.card.CardAdapter.BUNDLE_KEY_LOCAL_
public class CardAttachmentsFragment extends Fragment {
private Unbinder unbinder;
+ @BindView(R.id.coordinatorLayout)
+ CoordinatorLayout coordinatorLayout;
+ @BindView(R.id.fab)
+ FloatingActionButton fab;
@BindView(R.id.attachments_list)
RecyclerView attachmentsList;
@BindView(R.id.no_attachments)
@@ -61,6 +69,10 @@ public class CardAttachmentsFragment extends Fragment {
});
}
+ fab.setOnClickListener(v -> {
+ Snackbar.make(coordinatorLayout, "Adding attachments is not yet implemented", Snackbar.LENGTH_LONG).show();
+ });
+
return view;
}
diff --git a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml
index eb708bbed..e3990f93d 100644
--- a/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml
+++ b/app/src/main/res/layout/fragment_card_edit_tab_attachments.xml
@@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
+
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/coordinatorLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_marginTop="@dimen/standard_margin"
- android:orientation="vertical">
+ tools:context=".ui.EditActivity">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/attachments_list"
@@ -53,4 +55,12 @@
android:text="@string/no_files_attached_to_this_card" />
</RelativeLayout>
-</LinearLayout> \ No newline at end of file
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|end"
+ android:layout_margin="@dimen/fab_margin"
+ app:backgroundTint="@color/primary"
+ app:srcCompat="@drawable/ic_add_white_24dp" />
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file