summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/voicemail/listui/res
diff options
context:
space:
mode:
authoruabdullah <uabdullah@google.com>2018-02-28 15:54:50 -0800
committerCopybara-Service <copybara-piper@google.com>2018-02-28 17:11:29 -0800
commit210452f13a70de30a46c4ee2aa41668f840dfefd (patch)
tree593cb33e3260fdc0da1d356c5c2df847279121db /java/com/android/dialer/voicemail/listui/res
parent360c751fe5f6e75d45dfbe05facf225bfe5d2eca (diff)
Show empty view when there are no voicemails
When there are no voicemails to be shown, we show an empty view. This is done by hiding the recycler view and showing the empty view. Similarly when a voicemail is present, we hide the empty view and then show the recycler view. Bug: 25661977 Test: Unit Tests PiperOrigin-RevId: 187396952 Change-Id: Ifa718fb05c1be37aabdf4c91bc2c1653357565b2
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/res')
-rw-r--r--java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml28
-rw-r--r--java/com/android/dialer/voicemail/listui/res/values/strings.xml3
2 files changed, 24 insertions, 7 deletions
diff --git a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
index 9daa3e114..fd9e0f2d2 100644
--- a/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
+++ b/java/com/android/dialer/voicemail/listui/res/layout/new_voicemail_call_log_fragment.xml
@@ -15,21 +15,35 @@
~ limitations under the License
-->
-
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/fragment_my_frame_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:id="@+id/new_voicemail_frame_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
android:orientation="vertical">
- <include layout="@layout/voicemail_tos_fragment"/>
<android.support.v7.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/new_voicemail_call_log_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/background_dialer_light"
android:paddingBottom="@dimen/floating_action_button_list_bottom_padding"
- android:clipToPadding="false"/>
+ android:background="@color/background_dialer_light"
+ android:clipToPadding="false"
+ android:visibility="gone"
+ />
+
+
+ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <com.android.dialer.widget.EmptyContentView
+ android:id="@+id/empty_content_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:visibility="gone"/>
+
+ </FrameLayout>
</FrameLayout>
diff --git a/java/com/android/dialer/voicemail/listui/res/values/strings.xml b/java/com/android/dialer/voicemail/listui/res/values/strings.xml
index db33c1909..d12a71ee6 100644
--- a/java/com/android/dialer/voicemail/listui/res/values/strings.xml
+++ b/java/com/android/dialer/voicemail/listui/res/values/strings.xml
@@ -57,4 +57,7 @@ If you do not accept all of these terms and conditions, do not use Visual Voice
<!-- Label indicating who provided the voicemail transcription [CHAR LIMIT=64] -->
<string name="voicemail_transcription_branding_text">Transcribed by Google</string>
+ <!-- Text displayed when the list of voicemails is empty [CHAR LIMIT=NONE] -->
+ <string name="empty_voicemail_tab_text">Your voicemail inbox is empty.</string>
+
</resources>