Issue
I have a PNG icon file named icon.png and I want to use it as my Xamarin.Form app's icon. So here's what I've done -
- Changed Application Icon from Android Options
- Changed
Icon = "@mipmap/icon"
inMainActivity.cs
file
Still it was showing the default Xamarin logo icon. Then I did the followings -
- Changed
<foreground android:drawable="@mipmap/icon" />
inicon.xml
file - Changed
<foreground android:drawable="@mipmap/icon" />
inicon_round.xml
file
Now the default android icon is showing but not my icon. What to do? Please help.
I tried matching all the icons dimension to the default icons dimension, also tried the followings - 36px for idpi, 48px for mdpi, 72px for hdpi, 96px for xhdpi, 144px for xxhdpi
I also tried restarting VS, rebuilding the entire solution, clearing cache and temp files.
Solution
I have checked the code sample. Do the changes below it would change the application icon.
Change the icon in MainActivity:
Icon = "@drawable/logo"
Change the Application icon in Android Manifest:
Sceenshot:
Answered By - Wendy Zang - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.