Skip to content

Commit ed291c9

Browse files
LunarXKevinBoulongne
authored andcommitted
Add empty state for tablet mode instead of a single string
1 parent af7fd64 commit ed291c9

File tree

4 files changed

+91
-6
lines changed

4 files changed

+91
-6
lines changed

app/src/main/java/com/infomaniak/mail/ui/main/thread/ThreadFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class ThreadFragment : Fragment() {
389389

390390
private fun observeCurrentFolderName() {
391391
twoPaneViewModel.rightPaneFolderName.observe(viewLifecycleOwner) {
392-
binding.emptyView.text = getString(R.string.noConversationSelected, it)
392+
binding.emptyView.title = getString(R.string.noConversationSelected, it)
393393
}
394394
}
395395

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Infomaniak Mail - Android
3+
~ Copyright (C) 2024 Infomaniak Network SA
4+
~
5+
~ This program is free software: you can redistribute it and/or modify
6+
~ it under the terms of the GNU General Public License as published by
7+
~ the Free Software Foundation, either version 3 of the License, or
8+
~ (at your option) any later version.
9+
~
10+
~ This program is distributed in the hope that it will be useful,
11+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
~ GNU General Public License for more details.
14+
~
15+
~ You should have received a copy of the GNU General Public License
16+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
-->
18+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:width="112dp"
20+
android:height="80dp"
21+
android:viewportWidth="112"
22+
android:viewportHeight="80">
23+
<path
24+
android:fillColor="#666666"
25+
android:pathData="M11.25,21.81H100.15V72.79C100.15,76.61 97.06,79.7 93.24,79.7H18.16C14.34,79.7 11.25,76.61 11.25,72.79V21.81Z"
26+
android:strokeWidth="0.5"
27+
android:strokeColor="#E0E0E0" />
28+
<path
29+
android:fillColor="#333333"
30+
android:pathData="M52.85,55.26L11.7,21.81H99.69L58.55,55.26C56.89,56.61 54.51,56.61 52.85,55.26Z"
31+
android:strokeWidth="0.5"
32+
android:strokeColor="#E0E0E0" />
33+
<path
34+
android:fillColor="#333333"
35+
android:pathData="M100.15,21.8L11.24,21.8L53.6,1.03C54.92,0.38 56.47,0.38 57.8,1.03L100.15,21.8Z"
36+
android:strokeWidth="0.5"
37+
android:strokeColor="#E0E0E0" />
38+
<path
39+
android:fillColor="#666666"
40+
android:pathData="M58.88,47.06L92.38,79.75L19.07,79.75L52.57,47.06C54.32,45.34 57.12,45.34 58.88,47.06Z"
41+
android:strokeWidth="0.5"
42+
android:strokeColor="#E0E0E0" />
43+
</vector>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Infomaniak Mail - Android
3+
~ Copyright (C) 2024 Infomaniak Network SA
4+
~
5+
~ This program is free software: you can redistribute it and/or modify
6+
~ it under the terms of the GNU General Public License as published by
7+
~ the Free Software Foundation, either version 3 of the License, or
8+
~ (at your option) any later version.
9+
~
10+
~ This program is distributed in the hope that it will be useful,
11+
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
~ GNU General Public License for more details.
14+
~
15+
~ You should have received a copy of the GNU General Public License
16+
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
-->
18+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
19+
android:width="112dp"
20+
android:height="80dp"
21+
android:viewportWidth="112"
22+
android:viewportHeight="80">
23+
<path
24+
android:fillColor="#FAFAFA"
25+
android:pathData="M11.25,21.81H100.15V72.79C100.15,76.61 97.06,79.7 93.24,79.7H18.16C14.34,79.7 11.25,76.61 11.25,72.79V21.81Z"
26+
android:strokeWidth="0.5"
27+
android:strokeColor="#9F9F9F" />
28+
<path
29+
android:fillColor="#F1F1F1"
30+
android:pathData="M52.85,55.26L11.7,21.81H99.69L58.55,55.26C56.89,56.61 54.51,56.61 52.85,55.26Z"
31+
android:strokeWidth="0.5"
32+
android:strokeColor="#9F9F9F" />
33+
<path
34+
android:fillColor="#F1F1F1"
35+
android:pathData="M100.15,21.8L11.24,21.8L53.6,1.03C54.92,0.38 56.47,0.38 57.8,1.03L100.15,21.8Z"
36+
android:strokeWidth="0.5"
37+
android:strokeColor="#9F9F9F" />
38+
<path
39+
android:fillColor="#FAFAFA"
40+
android:pathData="M58.88,47.06L92.38,79.75L19.07,79.75L52.57,47.06C54.32,45.34 57.12,45.34 58.88,47.06Z"
41+
android:strokeWidth="0.5"
42+
android:strokeColor="#9F9F9F" />
43+
</vector>

app/src/main/res/layout/fragment_thread.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?><!--
22
~ Infomaniak Mail - Android
3-
~ Copyright (C) 2022-2023 Infomaniak Network SA
3+
~ Copyright (C) 2022-2024 Infomaniak Network SA
44
~
55
~ This program is free software: you can redistribute it and/or modify
66
~ it under the terms of the GNU General Public License as published by
@@ -126,13 +126,12 @@
126126
app:menu="@menu/message_menu" />
127127
</androidx.constraintlayout.widget.ConstraintLayout>
128128

129-
<TextView
129+
<com.infomaniak.mail.ui.main.EmptyStateView
130130
android:id="@+id/emptyView"
131131
android:layout_width="match_parent"
132132
android:layout_height="match_parent"
133-
android:gravity="center"
134-
android:visibility="visible"
135-
tools:text="@string/noConversationSelected"
133+
app:icon="@drawable/ic_empty_state_tablet"
134+
tools:title="@string/noConversationSelected"
136135
tools:visibility="gone" />
137136

138137
</FrameLayout>

0 commit comments

Comments
 (0)