Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty state for tablet mode instead of a single string #1663

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class ThreadFragment : Fragment() {

private fun observeCurrentFolderName() {
twoPaneViewModel.rightPaneFolderName.observe(viewLifecycleOwner) {
binding.emptyView.text = getString(R.string.noConversationSelected, it)
binding.emptyView.title = getString(R.string.noConversationSelected, it)
}
}

Expand Down
43 changes: 43 additions & 0 deletions app/src/main/res/drawable-night/ic_empty_state_tablet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU 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 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/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="112dp"
android:height="80dp"
android:viewportWidth="112"
android:viewportHeight="80">
<path
android:fillColor="#666666"
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"
android:strokeWidth="0.5"
android:strokeColor="#E0E0E0" />
<path
android:fillColor="#333333"
android:pathData="M52.85,55.26L11.7,21.81H99.69L58.55,55.26C56.89,56.61 54.51,56.61 52.85,55.26Z"
android:strokeWidth="0.5"
android:strokeColor="#E0E0E0" />
<path
android:fillColor="#333333"
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"
android:strokeWidth="0.5"
android:strokeColor="#E0E0E0" />
<path
android:fillColor="#666666"
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"
android:strokeWidth="0.5"
android:strokeColor="#E0E0E0" />
</vector>
43 changes: 43 additions & 0 deletions app/src/main/res/drawable/ic_empty_state_tablet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU 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 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/>.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="112dp"
android:height="80dp"
android:viewportWidth="112"
android:viewportHeight="80">
<path
android:fillColor="#FAFAFA"
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"
android:strokeWidth="0.5"
android:strokeColor="#9F9F9F" />
<path
android:fillColor="#F1F1F1"
android:pathData="M52.85,55.26L11.7,21.81H99.69L58.55,55.26C56.89,56.61 54.51,56.61 52.85,55.26Z"
android:strokeWidth="0.5"
android:strokeColor="#9F9F9F" />
<path
android:fillColor="#F1F1F1"
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"
android:strokeWidth="0.5"
android:strokeColor="#9F9F9F" />
<path
android:fillColor="#FAFAFA"
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"
android:strokeWidth="0.5"
android:strokeColor="#9F9F9F" />
</vector>
9 changes: 4 additions & 5 deletions app/src/main/res/layout/fragment_thread.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2022-2023 Infomaniak Network SA
~ Copyright (C) 2022-2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -126,13 +126,12 @@
app:menu="@menu/message_menu" />
</androidx.constraintlayout.widget.ConstraintLayout>

<TextView
<com.infomaniak.mail.ui.main.EmptyStateView
android:id="@+id/emptyView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:visibility="visible"
tools:text="@string/noConversationSelected"
app:icon="@drawable/ic_empty_state_tablet"
tools:title="@string/noConversationSelected"
tools:visibility="gone" />

</FrameLayout>
Loading