Search code examples
androidiosiphonetitaniumtitanium-mobile

Add .setBadge to a ImageView in titanium


Badge on top of an image

I need to add a badge like the added picture. the badge needs to be above an imageView. how can i implement that in Titanium. I'm not using the alloy folder


Solution

  • @Manuel_Rodrigues. There's no a good way to accomplish the effect you want, but there's a compromise method to get the similar effect. In this way you can consider that the badge is a image too, so just put the badge upon the background image can accomplish the effect. In Titanium, it called MaskedImage which combine too images or just render a image with various blend mode. Well, I don't have a try but maybe it can help you. Check for this link, you'll get more details!