n179911
n179911

Reputation: 20331

How to overlay an icon image on top of an exisiting view

If I have a reference to a view, how can I overlay an icon image on top of an existing view? Like in the screenshot below (http://android.kanokgems.com/sms-unread-count):

screenshot showing unread count on top of the icon

It overlays an icon at the top right corner of the dialer icon. How can I do that?

Thank you.

Upvotes: 3

Views: 4067

Answers (1)

Muhammad Abdullah
Muhammad Abdullah

Reputation: 2494

Using RelativeLayout, you could place 2 imageviews on the same place. The second imageview will be placed automatically on top of the first one. You could assign the properties on the second one to aligned it on the left, bottom, above, or right of the first one.

Upvotes: 3

Related Questions