Did any of you successfully make use of the "Adaptive Icons" for xamarin android, introduced in Oreo?
I managed to make it work, if the .png images are placed in the Drawable-folders, but not if they are placed in the MipMap-folders.
I have followed the guidelines in this link, and it works when using Android Studio... weird I think?
https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive.html
Thanks to this blog post I was able to use adaptive Icons in my Xamarin.Forms Android app.
Steps involved
Image Asset
in Android Studio as the editor is first initializing.)mipmap-*
-folder into the Xamarin.Forms Android Project Resources
directory.AndroidManifest.xml
to contain the new icon
and roundIcon
asset
<application android:label="MyApp"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:appCategory="productivity"></application>
Icon
and RoundIcon
values
namespace MyApp.Droid
{
[Activity(Label = "MyApp", Icon = "@mipmap/ic_launcher", RoundIcon = "@mipmap/ic_launcher_round", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With