Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Rysunek 1. Powiadomienie o postępie u góry ekranu.
Android 16 wprowadza nowy szablon powiadomienia, który ułatwia użytkownikom śledzenie ścieżek od początku do końca. Te powiadomienia będą lepiej widoczne w interfejsach systemowych i w panelu powiadomień.
Użyj Notification.ProgressStyle, aby nadać styl powiadomieniom z postępem.
Najważniejsze przypadki użycia to: przejazdy, dostawy i nawigacja. W tej klasie znajdziesz możliwość oznaczania stanów i etapów ścieżki użytkownika za pomocą punktów i segmentów.
Odpowiednie klasy
Te klasy zawierają różne interfejsy API, których używasz do tworzenia powiadomienia ProgressStyle:
Na tych obrazach widać różne elementy, z których składają się powiadomienia ProgressStyle:
Rysunek 2. Różne części ProgressStyle notification.Figure 3. Apps can set a vehicle image for the tracker icon and use segments
and points to denote the rideshare experience and milestones.
Set up
Use the right APIs and follow best practices to provide the best user experience
for progress updates.
Use the right visual elements to guide users. For example, rideshare apps
should set a vehicle image and use the most accurate color of the vehicle in
the notification using Notification#setLargeIcon.
Use concise and clear language to define the progress of the user journey.
Time of arrival, driver name, and state of the journey are important text
that the notification should communicate.
Provide useful and relevant actions in the notification that streamline
the user journey. For example, providing "Tip" and "Add dish" to a newly
initiated food delivery order are useful actions before delivery.
Use segments and points to denote states. For example, segments
can colorize the state and duration of traffic in a rideshare journey.
Points represent states for milestones such as food preparation, delivery,
and passenger pickup.
Update the progress experience to accurately reflect the actual
progression of the journey. For example, changes in traffic conditions can
be reflected in changes in segment colors and updates in text.
The following example shows a ProgressStyle notification for a rideshare app.
The example shows the use of a vehicle image for the tracker icon. It also shows
the use of segments and points to denote the rideshare experience and
milestones.
Treść strony i umieszczone na niej fragmenty kodu podlegają licencjom opisanym w Licencji na treści. Java i OpenJDK są znakami towarowymi lub zastrzeżonymi znakami towarowymi należącymi do firmy Oracle lub jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-06-18 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-06-18 UTC."],[],[]]