Android Oreo - how do I set Adaptive Icons in Cordova?

前端 未结 9 1609
死守一世寂寞
死守一世寂寞 2020-12-24 13:57

Just wondering if anyone been able to set adaptive icons on Cordova for Android Oreo? I\'m using the android 6.4.0 and my square icon shrinks to fit the circle. I just want

9条回答
  •  有刺的猬
    2020-12-24 14:39

    As far as I know, Cordova doesn't set Adaptive Icons yet. But it's easy enough to do manually after you've run Cordova build.

    Change android:icon in AndroidManifest.xml to:

      
    

    Create ic_launcher.xml in res/drawable with:

    
    
        
        
    
    

    Then add your two vector files ic_launcher_background.xml and ic_launcher_foreground.xml in res/drawable. These can be created with this tool: http://inloop.github.io/svg2android/

    And away you go! I hope Cordova bakes this into their builds soon.

提交回复
热议问题