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

github.com/nextcloud/talk-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hibbe <dev@mhibbe.de>2021-12-28 17:10:29 +0300
committerMarcel Hibbe <dev@mhibbe.de>2022-02-25 14:11:36 +0300
commit05586ccf47c8bfc24499fd6c06fe87543200a3f9 (patch)
tree5a359248b20b9534615d953628a25525ee8f2b0c /app/src/main/res
parent3f6ef9aed226d8c2a5085fe3a93afcd549e91947 (diff)
add user status option to account dialog (WIP)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/drawable/ic_edit.xml34
-rw-r--r--app/src/main/res/drawable/ic_user_status_away.xml32
-rw-r--r--app/src/main/res/drawable/ic_user_status_dnd.xml38
-rw-r--r--app/src/main/res/drawable/ic_user_status_invisible.xml34
-rw-r--r--app/src/main/res/drawable/online_status.xml23
-rw-r--r--app/src/main/res/layout/dialog_choose_account.xml39
-rw-r--r--app/src/main/res/layout/dialog_set_status.xml453
-rw-r--r--app/src/main/res/layout/predefined_status.xml62
-rw-r--r--app/src/main/res/values-night/colors.xml2
-rw-r--r--app/src/main/res/values/colors.xml7
-rw-r--r--app/src/main/res/values/dimens.xml6
-rw-r--r--app/src/main/res/values/strings.xml21
-rw-r--r--app/src/main/res/values/styles.xml8
13 files changed, 758 insertions, 1 deletions
diff --git a/app/src/main/res/drawable/ic_edit.xml b/app/src/main/res/drawable/ic_edit.xml
new file mode 100644
index 000000000..406f0b5f6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_edit.xml
@@ -0,0 +1,34 @@
+<!--
+ ~
+ ~ Nextcloud Android client application
+ ~
+ ~ @author Tobias Kaminsky
+ ~ Copyright (C) 2019 Tobias Kaminsky
+ ~ Copyright (C) 2019 Nextcloud GmbH
+ ~
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU Affero General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU Affero General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Affero General Public License
+ ~ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ -->
+
+<vector xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:width="24dp"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ tools:ignore="VectorRaster">
+ <path
+ android:fillColor="#FF000000"
+ android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_user_status_away.xml b/app/src/main/res/drawable/ic_user_status_away.xml
new file mode 100644
index 000000000..ab5ca9642
--- /dev/null
+++ b/app/src/main/res/drawable/ic_user_status_away.xml
@@ -0,0 +1,32 @@
+<!--
+ Nextcloud Android client application
+
+ @author Tobias Kaminsky
+ Copyright (C) 2020 Tobias Kaminsky
+ Copyright (C) 2020 Nextcloud GmbH
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+ You should have received a copy of the GNU Affero General Public
+ License along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<vector xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:width="24dp"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ tools:ignore="VectorRaster">
+ <path
+ android:fillColor="#f4a331"
+ android:pathData="m10.615,2.1094c-4.8491,0.6811 -8.6152,4.8615 -8.6152,9.8906 0,5.5 4.5,10 10,10 5.0292,0 9.2096,-3.7661 9.8906,-8.6152 -1.4654,1.601 -3.5625,2.6152 -5.8906,2.6152 -4.4,0 -8,-3.6 -8,-8 0,-2.3281 1.0143,-4.4252 2.6152,-5.8906z" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_user_status_dnd.xml b/app/src/main/res/drawable/ic_user_status_dnd.xml
new file mode 100644
index 000000000..27cfc1066
--- /dev/null
+++ b/app/src/main/res/drawable/ic_user_status_dnd.xml
@@ -0,0 +1,38 @@
+<!--
+ Nextcloud Android client application
+
+ @author Tobias Kaminsky
+ Copyright (C) 2020 Tobias Kaminsky
+ Copyright (C) 2020 Nextcloud GmbH
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ License as published by the Free Software Foundation; either
+ version 3 of the License, or any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+ You should have received a copy of the GNU Affero General Public
+ License along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<vector xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:width="24dp"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ tools:ignore="VectorRaster">
+ <path
+ android:fillColor="#ed484c"
+ android:pathData="m12,2c-5.52,0 -10,4.48 -10,10s4.48,10 10,10 10,-4.48 10,-10 -4.48,-10 -10,-10z" />
+ <path
+ android:fillColor="#fdffff"
+ android:pathData="m8,10h8c1.108,0 2,0.892 2,2s-0.892,2 -2,2h-8c-1.108,0 -2,-0.892 -2,-2s0.892,-2 2,-2z"
+ android:strokeLineCap="round"
+ android:strokeLineJoin="round"
+ android:strokeWidth="2" />
+</vector>
diff --git a/app/src/main/res/drawable/ic_user_status_invisible.xml b/app/src/main/res/drawable/ic_user_status_invisible.xml
new file mode 100644
index 000000000..18a35e8e1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_user_status_invisible.xml
@@ -0,0 +1,34 @@
+<!--
+ ~
+ ~ Nextcloud Android client application
+ ~
+ ~ @author Tobias Kaminsky
+ ~ Copyright (C) 2020 Tobias Kaminsky
+ ~ Copyright (C) 2020 Nextcloud GmbH
+ ~
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU Affero General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU Affero General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Affero General Public License
+ ~ along with this program. If not, see <https://www.gnu.org/licenses/>.
+ -->
+
+<vector xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:width="24dp"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ tools:ignore="VectorRaster">
+ <path
+ android:fillColor="#000000"
+ android:pathData="m12,2c-5.52,0 -10,4.48 -10,10s4.48,10 10,10 10,-4.48 10,-10 -4.48,-10 -10,-10zM12,6a6,6 0,0 1,6 6,6 6,0 0,1 -6,6 6,6 0,0 1,-6 -6,6 6,0 0,1 6,-6z" />
+</vector>
diff --git a/app/src/main/res/drawable/online_status.xml b/app/src/main/res/drawable/online_status.xml
new file mode 100644
index 000000000..fb042c2d3
--- /dev/null
+++ b/app/src/main/res/drawable/online_status.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ Nextcloud Android client application
+
+ @author Andy Scherzinger
+ Copyright (C) 2019 Andy Scherzinger
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="oval">
+ <solid android:color="#00ff00" />
+</shape>
diff --git a/app/src/main/res/layout/dialog_choose_account.xml b/app/src/main/res/layout/dialog_choose_account.xml
index b15e29920..702a7392a 100644
--- a/app/src/main/res/layout/dialog_choose_account.xml
+++ b/app/src/main/res/layout/dialog_choose_account.xml
@@ -17,6 +17,7 @@
-->
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:orientation="vertical">
@@ -31,6 +32,42 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+ <LinearLayout
+ android:id="@+id/statusView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="gone"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/current_account"
+ tools:visibility="visible">
+
+ <View
+ android:layout_width="match_parent"
+ android:layout_height="1dp"
+ android:layout_marginTop="4dp"
+ android:background="@color/list_divider_background" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/set_status"
+ style="@style/Nextcloud.Material.TextButton"
+ android:layout_width="match_parent"
+ android:layout_height="50dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp"
+ android:paddingStart="10dp"
+ android:paddingEnd="0dp"
+ android:text="@string/set_status"
+ android:textAlignment="textStart"
+ android:textAllCaps="false"
+ android:textColor="@color/fontAppbar"
+ app:icon="@drawable/ic_edit"
+ app:iconGravity="start"
+ app:iconPadding="22dp"
+ app:iconTint="@color/fontAppbar" />
+ </LinearLayout>
+
<View
android:id="@+id/separator_line"
android:layout_width="0dp"
@@ -39,7 +76,7 @@
android:background="@color/controller_chat_separator"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/current_account" />
+ app:layout_constraintTop_toBottomOf="@id/statusView" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/accounts_list"
diff --git a/app/src/main/res/layout/dialog_set_status.xml b/app/src/main/res/layout/dialog_set_status.xml
new file mode 100644
index 000000000..521f6db42
--- /dev/null
+++ b/app/src/main/res/layout/dialog_set_status.xml
@@ -0,0 +1,453 @@
+<!--
+ Nextcloud Android client application
+
+ Copyright (C) 2020 Andy Scherzinger
+ Copyright (C) 2020 Tobias Kaminsky
+ Copyright (C) 2020 Nextcloud GmbH
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2,
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+-->
+<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="match_parent"
+ android:orientation="vertical"
+ android:padding="@dimen/standard_padding">
+
+ <TextView
+ android:id="@+id/onlineStatusView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/standard_half_margin"
+ android:text="@string/online_status"
+ android:textColor="@color/high_emphasis_text"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <LinearLayout
+ android:id="@+id/statusView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:baselineAligned="false"
+ android:orientation="vertical"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/onlineStatusView">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/standard_margin"
+ android:orientation="horizontal">
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/onlineStatus"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/online_status_item_height"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ app:cardBackgroundColor="@color/grey_200"
+ app:cardElevation="0dp">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_margin"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:orientation="horizontal"
+ tools:ignore="UnusedAttribute">
+
+ <ImageView
+ android:id="@+id/online_icon"
+ android:layout_width="@dimen/iconized_single_line_item_icon_size"
+ android:layout_height="@dimen/iconized_single_line_item_icon_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="top|start"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:contentDescription="@null"
+ android:src="@drawable/online_status"
+ app:tint="@color/hwSecurityGreen" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toEndOf="@id/online_icon"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/online_headline"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="bottom"
+ android:maxLines="1"
+ android:text="@string/online"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
+ <TextView
+ android:id="@+id/online_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/standard_half_margin"
+ android:layout_marginBottom="@dimen/standard_quarter_margin"
+ android:ellipsize="end"
+ android:gravity="top"
+ android:maxLines="1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/awayStatus"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/online_status_item_height"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_half_margin"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ app:cardBackgroundColor="@color/grey_200"
+ app:cardElevation="0dp">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_margin"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:orientation="horizontal"
+ tools:ignore="UnusedAttribute">
+
+ <ImageView
+ android:id="@+id/away_icon"
+ android:layout_width="@dimen/iconized_single_line_item_icon_size"
+ android:layout_height="@dimen/iconized_single_line_item_icon_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="top|start"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:contentDescription="@null"
+ android:src="@drawable/ic_user_status_away"
+ app:tint="#f4a331" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toEndOf="@id/away_icon"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/away_headline"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="bottom"
+ android:maxLines="1"
+ android:text="@string/away"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
+ <TextView
+ android:id="@+id/away_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/standard_half_margin"
+ android:layout_marginBottom="@dimen/standard_quarter_margin"
+ android:ellipsize="end"
+ android:gravity="top"
+ android:maxLines="1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/standard_margin"
+ android:orientation="horizontal">
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/dndStatus"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/online_status_item_height"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ app:cardBackgroundColor="@color/grey_200"
+ app:cardElevation="0dp">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_margin"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:orientation="horizontal"
+ tools:ignore="UnusedAttribute">
+
+ <ImageView
+ android:id="@+id/dnd_icon"
+ android:layout_width="@dimen/iconized_single_line_item_icon_size"
+ android:layout_height="@dimen/iconized_single_line_item_icon_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="top|start"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:contentDescription="@null"
+ android:src="@drawable/ic_user_status_dnd" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toEndOf="@id/dnd_icon"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/dnd_headline"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="bottom"
+ android:maxLines="1"
+ android:text="@string/dnd"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/invisibleStatus"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/online_status_item_height"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_half_margin"
+
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ app:cardBackgroundColor="@color/grey_200"
+ app:cardElevation="0dp">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginStart="@dimen/standard_margin"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:orientation="horizontal"
+ tools:ignore="UnusedAttribute">
+
+ <ImageView
+ android:id="@+id/invisible_icon"
+ android:layout_width="@dimen/iconized_single_line_item_icon_size"
+ android:layout_height="@dimen/iconized_single_line_item_icon_size"
+ android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_gravity="top|start"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:contentDescription="@null"
+ android:src="@drawable/ic_user_status_invisible" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toEndOf="@id/invisible_icon"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/invisible_headline"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:gravity="bottom"
+ android:maxLines="1"
+ android:text="@string/invisible"
+ android:textAppearance="?android:attr/textAppearanceListItem" />
+
+ </LinearLayout>
+
+ </RelativeLayout>
+
+ </com.google.android.material.card.MaterialCardView>
+
+ </LinearLayout>
+ </LinearLayout>
+
+
+ <View
+ android:id="@+id/separator_line"
+ android:layout_width="0dp"
+ android:layout_height="1dp"
+ android:layout_marginTop="@dimen/standard_quarter_margin"
+ android:background="@color/list_divider_background"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/statusView" />
+
+ <LinearLayout
+ android:id="@+id/fragment_container"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/statusMessage"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/standard_half_margin"
+ android:text="@string/status_message"
+ android:textColor="@color/high_emphasis_text"
+ android:textSize="@dimen/activity_list_item_title_header_text_size"
+ app:layout_constraintTop_toBottomOf="@+id/statusView" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <com.google.android.material.card.MaterialCardView
+ android:id="@+id/emojiCard"
+ android:layout_width="@dimen/activity_row_layout_height"
+ android:layout_height="@dimen/activity_row_layout_height"
+ android:layout_gravity="center"
+ android:layout_marginTop="@dimen/standard_eighth_margin"
+ android:layout_marginEnd="@dimen/standard_margin"
+ android:orientation="horizontal"
+ app:cardBackgroundColor="@color/grey_200"
+ app:cardCornerRadius="24dp"
+ app:cardElevation="0dp">
+
+ <com.vanniktech.emoji.EmojiEditText
+ android:id="@+id/emoji"
+ android:layout_width="@dimen/activity_row_layout_height"
+ android:layout_height="@dimen/activity_row_layout_height"
+ android:background="@color/grey_200"
+ android:cursorVisible="false"
+ android:gravity="center"
+ android:text="@string/default_emoji"
+ android:textSize="24sp" />
+
+ </com.google.android.material.card.MaterialCardView>
+
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/customStatusInput_container"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:hint="@string/whats_your_status">
+
+ <com.google.android.material.textfield.TextInputEditText
+ android:id="@+id/customStatusInput"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ems="10"
+ android:importantForAutofill="no"
+ android:inputType="textAutoCorrect"
+ android:scrollbars="vertical">
+
+ </com.google.android.material.textfield.TextInputEditText>
+
+ </com.google.android.material.textfield.TextInputLayout>
+
+ </LinearLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/predefinedStatusList"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ tools:itemCount="5"
+ tools:listitem="@layout/predefined_status" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/standard_half_margin"
+ android:orientation="horizontal">
+
+ <TextView
+ android:id="@+id/clearStatusMessageTextView"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/clear_status_message_after"
+ android:textColor="@color/high_emphasis_text" />
+
+ <Spinner
+ android:id="@+id/clearStatusAfterSpinner"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <TextView
+ android:id="@+id/remainingClearTime"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/high_emphasis_text"
+ android:layout_marginStart="4dp"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/standard_half_margin"
+ android:orientation="horizontal">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/clearStatus"
+ style="@style/OutlinedButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/standard_half_margin"
+ android:layout_weight="1"
+ android:text="@string/clear_status_message"
+ app:cornerRadius="@dimen/button_corner_radius" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/setStatus"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/set_status_message"
+ android:theme="@style/Button.Primary"
+ app:cornerRadius="@dimen/button_corner_radius" />
+
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/app/src/main/res/layout/predefined_status.xml b/app/src/main/res/layout/predefined_status.xml
new file mode 100644
index 000000000..69e080c4f
--- /dev/null
+++ b/app/src/main/res/layout/predefined_status.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+
+ Nextcloud Android client application
+
+ Copyright (C) 2020 Andy Scherzinger
+ Copyright (C) 2020 Tobias Kaminsky
+ Copyright (C) 2020 Nextcloud GmbH
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="48dp">
+
+ <TextView
+ android:id="@+id/icon"
+ android:layout_width="48dp"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:textSize="25sp"
+ tools:text="📆" />
+
+ <TextView
+ android:id="@+id/name"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ tools:text="In a meeting" />
+
+ <TextView
+ android:id="@+id/divider"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_margin="@dimen/standard_half_margin"
+ android:gravity="center_vertical"
+ android:text="@string/divider"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:textColor="?android:attr/textColorSecondary" />
+
+ <TextView
+ android:id="@+id/clearAt"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:textColor="?android:attr/textColorSecondary"
+ tools:text="an hour" />
+</LinearLayout>
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
index 622e1a854..6b62f1190 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -65,4 +65,6 @@
<!-- shimmer element colors -->
<color name="nc_shimmer_default_color">#4B4B4B</color>
<color name="nc_shimmer_darker_color">#282828</color>
+
+ <color name="list_divider_background">#222222</color>
</resources>
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 8b059a897..a152cde85 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -97,4 +97,11 @@
<color name="camera_bg_tint">#99121212</color>
+ <color name="list_divider_background">#eeeeee</color>
+ <color name="grey_200">#818181</color>
+ <color name="secondary_button_background_color">#D6D7D7</color>
+ <color name="secondary_button_text_color">#000000</color>
+ <color name="primary_button_background_color">#007cc2</color>
+ <color name="primary_button_text_color">#ffffff</color>
+
</resources>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 2bcef5826..753129d95 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -63,4 +63,10 @@
<dimen name="call_grid_item_min_height">180dp</dimen>
<dimen name="call_controls_height">110dp</dimen>
<dimen name="zero">0dp</dimen>
+
+ <dimen name="online_status_item_height">52dp</dimen>
+ <dimen name="standard_quarter_margin">4dp</dimen>
+ <dimen name="activity_list_item_title_header_text_size">16sp</dimen>
+ <dimen name="activity_row_layout_height">48dp</dimen>
+ <dimen name="standard_eighth_margin">2dp</dimen>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 345a31a82..05c9d63d2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -268,6 +268,27 @@
<string name="nc_remove_group_and_members">Remove group and members</string>
<string name="nc_attendee_pin">Pin: %1$s</string>
+ <!-- User Status -->
+ <string name="set_status">Set status</string>
+ <string name="online_status">Online status</string>
+ <string name="status_message">Status message</string>
+ <string name="whats_your_status">What is your status?</string>
+ <string name="clear_status_message_after">Clear status message after</string>
+ <string name="clear_status_message">Clear status message</string>
+ <string name="set_status_message">Set status message</string>
+ <string name="online">Online</string>
+ <string name="dnd">Do not disturb</string>
+ <string name="away">Away</string>
+ <string name="invisible">Invisible</string>
+ <string translatable="false" name="divider">—</string>
+ <string translatable="false" name="default_emoji">😃</string>
+ <string name="dontClear">Don\'t clear</string>
+ <string name="today">Today</string>
+ <string name="thirtyMinutes">30 minutes</string>
+ <string name="oneHour">1 hour</string>
+ <string name="fourHours">4 hours</string>
+ <string name="thisWeek">This week</string>
+
<!-- Conversations List-->
<string name="nc_new_mention">Unread mentions</string>
<string name="conversations">Conversations</string>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 89d41e79b..d97926026 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -240,4 +240,12 @@
<item name="android:windowSoftInputMode">adjustResize</item>
</style>
+ <style name="OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
+ <item name="colorAccent">@color/transparent</item>
+ <item name="android:textColor">@color/colorPrimaryDark</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:typeface">sans</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
</resources>