'How to create a custom view to create below UI in Android?

enter image description here

I can create this by using XML. But here my requirement is if I set attribute show_stepCount=3, then 3 views should be drawn on the canvas. I should be able to select one item at a time. I am not able to understand should I inherit my custom class by View or with some other view type to achieve the below UI.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source