aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 01:09:26 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 01:09:26 +0000
commit174bd4088114c3962326571a08943f595a80751e (patch)
treeae19916b4a52d1a69358950c1dc52b4b5e4f7d18 /src/com
parent62b1f102153befcadfd52d049da5d00e053dd743 (diff)
parenteb0ef17a805731255dd97cf193d63d9e05c09d58 (diff)
downloadCalendar-aml_tet_341712060.tar.gz
Change-Id: I90b94d6f04393cf2b52f934aa2c5c3f0d3326b8f
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/car/calendar/AllDayEventsItem.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/car/calendar/AllDayEventsItem.java b/src/com/android/car/calendar/AllDayEventsItem.java
index 92c00ca..d42d78c 100644
--- a/src/com/android/car/calendar/AllDayEventsItem.java
+++ b/src/com/android/car/calendar/AllDayEventsItem.java
@@ -19,6 +19,7 @@ package com.android.car.calendar;
import static com.google.common.base.Preconditions.checkNotNull;
import android.content.res.Resources;
+import android.icu.text.MessageFormat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -28,7 +29,10 @@ import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
+import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
+import java.util.Map;
class AllDayEventsItem implements CalendarItem {
@@ -78,8 +82,12 @@ class AllDayEventsItem implements CalendarItem {
hideEventSection();
int size = eventCalendarItems.size();
- mTitleTextView.setText(
- mResources.getQuantityString(R.plurals.all_day_title, size, size));
+ MessageFormat msgFmt = new MessageFormat(mResources.getString(
+ R.string.all_day_title), Locale.getDefault());
+ Map<String, Object> strArgs = new HashMap<>();
+ strArgs.put("count", size);
+ String title = msgFmt.format(strArgs);
+ mTitleTextView.setText(title);
for (EventCalendarItem eventCalendarItem : eventCalendarItems) {
EventCalendarItem.EventViewHolder holder =