Xamarin Forms Android TV app icon

Arbi 1 Reputation point
2021-02-25T01:25:39.113+00:00

I'm developing an android TV app using xamarin forms. I have a launcher icon for tv (350x180) but when I run it on a tv, it shows a squeezed square icon. Is there any way to make xamarin not to squeeze my icon?

thanks,

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,716 Reputation points Microsoft External Staff
    2021-02-25T02:47:44.467+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    Please recheck the AndroidManifest.xml file in your android app.
    We can find the following code for settting app icon:

    android:icon="@mipmap/ic_launcher"  
    android:roundIcon="@mipmap/ic_launcher_round"  
    

    The whole code is:

     <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"></application>  
    

    Besides, there is also another place for us to set icon in our [Activity] custom attribute:

     [Activity (Label="My App", MainLauncher=true, Icon="@drawable/myicon")]   
    public class MainActivity: Activity   
    {  
    }  
    

    And if we have an icon activity definition in MainActivity and then try to change icon from manifest file, icon would not change because icon activity definition in Main Activity overrides the manifest.

    For more details, you can check: https://learn.microsoft.com/en-us/xamarin/android/platform/android-manifest#the-basics

    Hope it can help you.

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.