Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hình 1. Thông báo tập trung vào tiến trình ở đầu màn hình.
Android 16 giới thiệu một mẫu thông báo mới để giúp người dùng theo dõi liền mạch hành trình từ đầu đến cuối do người dùng khởi tạo. Các thông báo này sẽ có chế độ hiển thị nâng cấp trên các nền tảng hệ thống và thứ hạng cao nhất trong ngăn thông báo.
Sử dụng Notification.ProgressStyle để tạo kiểu cho các thông báo tập trung vào tiến trình.
Các trường hợp sử dụng chính bao gồm đi chung xe, giao hàng và chỉ đường. Trong lớp đó, bạn sẽ thấy khả năng biểu thị các trạng thái và mốc trong hành trình của người dùng bằng cách sử dụng Điểm và Phân đoạn.
Các lớp có liên quan
Các lớp sau đây chứa nhiều API mà bạn sử dụng để tạo thông báo ProgressStyle:
Hình ảnh sau đây cho thấy các phần khác nhau tạo nên thông báo ProgressStyle:
Hình 2.Các phần khác nhau của 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.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-06-18 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-18 UTC."],[],[]]