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>2020-04-08 20:14:27 +0300
committerStefan Niedermann <info@niedermann.it>2020-04-08 20:14:27 +0300
commit837f212e2a06fbe083be5a692cc6455eafd92c57 (patch)
tree45b5bec2250ad17b29293e2aa15d879effdf4f64 /app/src/main/res
parent153ced811039cf9ff1efebc80eed0e2bfe051a3f (diff)
#358 Create PickStackActivity
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_exception.xml6
-rw-r--r--app/src/main/res/layout/activity_pick_stack.xml90
-rw-r--r--app/src/main/res/layout/item_access_control.xml10
-rw-r--r--app/src/main/res/layout/item_access_control_owner.xml12
-rw-r--r--app/src/main/res/layout/item_pick_stack_account.xml45
-rw-r--r--app/src/main/res/layout/item_pick_stack_board.xml33
-rw-r--r--app/src/main/res/layout/item_pick_stack_stack.xml17
-rw-r--r--app/src/main/res/values/strings.xml2
-rw-r--r--app/src/main/res/xml/shortcuts.xml5
9 files changed, 203 insertions, 17 deletions
diff --git a/app/src/main/res/layout/activity_exception.xml b/app/src/main/res/layout/activity_exception.xml
index 36f438f8f..92b0b35ff 100644
--- a/app/src/main/res/layout/activity_exception.xml
+++ b/app/src/main/res/layout/activity_exception.xml
@@ -16,7 +16,7 @@
android:layout_height="?android:actionBarSize"
app:titleTextColor="@android:color/white"
tools:title="@string/simple_exception" />
-
+
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
@@ -41,10 +41,10 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
- android:fontFamily="monospace"
android:padding="@dimen/standard_margin"
android:scrollbars="horizontal|vertical"
- android:textIsSelectable="true" />
+ android:textIsSelectable="true"
+ app:fontFamily="monospace" />
<LinearLayout
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/activity_pick_stack.xml b/app/src/main/res/layout/activity_pick_stack.xml
new file mode 100644
index 000000000..2330a6c6e
--- /dev/null
+++ b/app/src/main/res/layout/activity_pick_stack.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:showIn="@layout/activity_pick_stack">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appBarLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?android:actionBarSize"
+ app:navigationIcon="@drawable/ic_arrow_back_white_24dp"
+ app:title="@string/simple_select"
+ app:titleTextColor="@android:color/white" />
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_above="@+id/buttonBar"
+ android:layout_below="@id/appBarLayout"
+ android:padding="@dimen/standard_padding">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <androidx.appcompat.widget.AppCompatSpinner
+ android:id="@+id/account_select"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:prompt="@string/choose_account"
+ android:spinnerMode="dialog"
+ tools:listitem="@layout/item_pick_stack_account" />
+
+ <androidx.appcompat.widget.AppCompatSpinner
+ android:id="@+id/board_select"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:prompt="@string/choose_board"
+ android:spinnerMode="dialog"
+ tools:listitem="@layout/item_board" />
+
+ <androidx.appcompat.widget.AppCompatSpinner
+ android:id="@+id/stack_select"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:prompt="@string/choose_list"
+ android:spinnerMode="dialog"
+ tools:listitem="@layout/item_board" />
+ </LinearLayout>
+ </ScrollView>
+
+ <LinearLayout
+ android:id="@+id/buttonBar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal"
+ android:padding="@dimen/standard_padding"
+ android:weightSum="1.0">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/cancel"
+ style="@android:style/Widget.DeviceDefault.Button.Borderless"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:layout_marginRight="@dimen/standard_half_margin"
+ android:layout_weight=".5"
+ android:text="@string/simple_select" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/submit"
+ style="@style/Widget.AppCompat.Button.Colored"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/standard_half_margin"
+ android:layout_marginLeft="@dimen/standard_half_margin"
+ android:layout_weight=".5"
+ android:text="@string/simple_select" />
+ </LinearLayout>
+</RelativeLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_access_control.xml b/app/src/main/res/layout/item_access_control.xml
index 0589b5d9e..9c920b4c3 100644
--- a/app/src/main/res/layout/item_access_control.xml
+++ b/app/src/main/res/layout/item_access_control.xml
@@ -14,7 +14,8 @@
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginRight="@dimen/standard_margin"
android:contentDescription="@null"
- app:srcCompat="@drawable/ic_person_grey600_24dp" />
+ app:srcCompat="@drawable/ic_person_grey600_24dp"
+ tools:srcCompat="@tools:sample/avatars" />
<LinearLayout
android:layout_width="match_parent"
@@ -31,21 +32,22 @@
android:id="@+id/username"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="center"
+ android:layout_weight="1"
android:textSize="16sp"
tools:drawableEnd="@drawable/ic_sync_blue_24dp"
- tools:text="Username" />
+ tools:text="@tools:sample/full_names" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="0dp"
android:layout_gravity="center"
android:background="?android:selectableItemBackground"
+ android:padding="0dp"
app:srcCompat="@drawable/ic_delete_black_24dp" />
</LinearLayout>
+
<com.google.android.flexbox.FlexboxLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/item_access_control_owner.xml b/app/src/main/res/layout/item_access_control_owner.xml
index 368f52480..5edcb6065 100644
--- a/app/src/main/res/layout/item_access_control_owner.xml
+++ b/app/src/main/res/layout/item_access_control_owner.xml
@@ -14,7 +14,8 @@
android:layout_marginEnd="@dimen/standard_margin"
android:layout_marginRight="@dimen/standard_margin"
android:contentDescription="@null"
- app:srcCompat="@drawable/ic_person_grey600_24dp" />
+ app:srcCompat="@drawable/ic_person_grey600_24dp"
+ tools:srcCompat="@tools:sample/avatars" />
<LinearLayout
android:layout_width="match_parent"
@@ -25,19 +26,18 @@
android:id="@+id/owner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="center"
+ android:layout_weight="1"
android:textSize="16sp"
- tools:text="Username" />
+ tools:text="@tools:sample/full_names" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
android:layout_gravity="center"
- android:textColor="@color/fg_secondary"
+ android:layout_weight="1"
android:text="@string/owner"
- tools:text="Username" />
+ android:textColor="@color/fg_secondary" />
</LinearLayout>
</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_pick_stack_account.xml b/app/src/main/res/layout/item_pick_stack_account.xml
new file mode 100644
index 000000000..3aeafb80c
--- /dev/null
+++ b/app/src/main/res/layout/item_pick_stack_account.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="@dimen/standard_padding">
+
+ <ImageView
+ android:id="@+id/avatar"
+ android:layout_width="@dimen/avatar_size"
+ android:layout_height="@dimen/avatar_size"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:layout_marginRight="@dimen/standard_margin"
+ android:contentDescription="@null"
+ app:srcCompat="@drawable/ic_person_grey600_24dp"
+ tools:srcCompat="@tools:sample/avatars" />
+
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/username"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:textSize="16sp"
+ tools:text="@tools:sample/full_names" />
+
+ <TextView
+ android:id="@+id/instance"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:text="@string/owner"
+ android:textColor="@color/fg_secondary" />
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_pick_stack_board.xml b/app/src/main/res/layout/item_pick_stack_board.xml
new file mode 100644
index 000000000..e0ab41b55
--- /dev/null
+++ b/app/src/main/res/layout/item_pick_stack_board.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="@dimen/standard_padding"
+ tools:ignore="UseCompoundDrawables">
+
+ <ImageView
+ android:id="@+id/avatar"
+ android:layout_width="@dimen/avatar_size"
+ android:layout_height="@dimen/avatar_size"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:layout_marginRight="@dimen/standard_margin"
+ android:contentDescription="@null"
+ android:padding="@dimen/standard_half_padding"
+ app:srcCompat="@drawable/circle_grey600_36dp"
+ tools:tint="@color/board_default_color" />
+
+ <TextView
+ android:id="@+id/board_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_weight="1"
+ android:ellipsize="middle"
+ android:singleLine="true"
+ android:textSize="16sp"
+ tools:text="@tools:sample/lorem/random" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_pick_stack_stack.xml b/app/src/main/res/layout/item_pick_stack_stack.xml
new file mode 100644
index 000000000..29ba63ca4
--- /dev/null
+++ b/app/src/main/res/layout/item_pick_stack_stack.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/stackTitle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="middle"
+ android:paddingStart="70dp"
+ android:paddingLeft="70dp"
+ android:paddingTop="@dimen/standard_padding"
+ android:paddingEnd="@dimen/standard_padding"
+ android:paddingRight="@dimen/standard_padding"
+ android:paddingBottom="@dimen/standard_padding"
+ android:singleLine="true"
+ android:textSize="16sp"
+ tools:text="@tools:sample/full_names" />
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 640bcc610..4ffb15509 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -172,4 +172,6 @@
<string name="no_comments_yet">No comments yet</string>
<string name="no_boards">No boards yet</string>
<string name="add_a_new_board_using_the_button">Add a new board using the + button</string>
+ <string name="choose_board">Choose board</string>
+ <string name="choose_list">Choose list</string>
</resources>
diff --git a/app/src/main/res/xml/shortcuts.xml b/app/src/main/res/xml/shortcuts.xml
index ab23766db..c37b1d3cd 100644
--- a/app/src/main/res/xml/shortcuts.xml
+++ b/app/src/main/res/xml/shortcuts.xml
@@ -9,10 +9,7 @@
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="it.niedermann.nextcloud.deck"
- android:targetClass="it.niedermann.nextcloud.deck.ui.card.EditActivity">
- <extra android:name="localId" android:value="-1" />
- <extra android:name="boardId" android:value="-1" />
- <extra android:name="stackId" android:value="-1" />
+ android:targetClass="it.niedermann.nextcloud.deck.ui.pickstack.PickStackActivity">
</intent>
<categories android:name="android.shortcut.conversation" />
</shortcut>