Model answer
Clarify & scope
I’d use a custom view when a Zomato experience needs a visual or interaction pattern that standard widgets cannot deliver cleanly. The goal is not to make every screen bespoke; it is to make important, reusable interactions clearer and more consistent.
User segments & pain points
I’d prioritize diners who make quick decisions on small screens, especially while comparing restaurants or tracking an order. They need key information—such as price, rating, delivery progress, and availability—to be easy to scan and interact with.
Goals & success metrics
The product goal is to reduce friction in the task the component supports. I’d measure task completion and time to complete, then use interaction errors or abandonment as guardrails. For example, a status component should improve order-status comprehension without increasing accessibility issues or rendering time.
Solutions
- Order tracking timeline: A reusable component can show stages such as confirmed, preparing, and on the way, with a clear current state and accessible text labels.
- Restaurant rating or offer indicator: A compact custom component can combine a visual rating, offer badge, or delivery estimate while preserving consistent layout across restaurant cards.
- Food customization control: A specialized selector can make choices such as spice level or add-ons easier to understand than a generic list of toggles.
Recommendation: I’d start with the order-tracking timeline if research shows customers have trouble understanding delivery progress. It has a clear user outcome and can be reused across order surfaces. I’d first check whether standard Android or Compose components can meet the need; a custom implementation is justified only if it meaningfully improves clarity or interaction.
Prioritization & trade-offs
I’d rank candidates by user impact, reuse, and implementation effort. A custom view can improve fidelity and reuse, but it also adds ownership costs: measurement, drawing, accessibility semantics, state handling, and testing. I’d keep business logic outside the component so it remains reusable and straightforward to validate.
MVP, measurement & rollout
I’d ship the smallest version for one order-tracking surface, test it with assistive technology and a range of screen sizes, and compare task completion and comprehension against the existing UI. After monitoring crashes, rendering performance, and user feedback, I’d expand it to other surfaces if the result is positive.