On your data is now generally available on Azure AI
What does this mean: This means you can now use your own data with powerful models like GPT4 to create copilot experiences within secure boundaries
We often encounter a situation where we need to use the same image in different colors. In this case, instead of using the same image with different colors, we can create our own control, allowing us to use the change icon color dynamically. Let’s call it IconView.
IconView allows you to give the color of your choice to the icons you use in your application. For example, you can change the color of a red icon to blue, green, etc., without having to change the icon.
Let’s see how to do it.
First, let's create a class that derives from View.
Add following code in your Android layer:
Add following code in your iOS layer:
That's it; now, if you want to change the icon's color, you can change the stain immediately instead of adding a new hero to your project.
Usage: Here, I am going to use the same image with different Red & Green colors.
Note: It is mandatory to give foreground color to make the image visible.
Output: As you can see, the same image with a different color.
Image credit: Image by story set on Freepik