浏览代码

Merge pull request #359 from ente-io/app-icon-size-on-android

App icon size on android
Neeraj Gupta 3 年之前
父节点
当前提交
e39e5f8bc7

+ 1 - 1
android/app/src/main/AndroidManifest.xml

@@ -1,5 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.ente.photos">
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.ente.photos">
-    <application android:name="${applicationName}" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true" android:allowBackup="false" android:fullBackupContent="false" android:largeHeap="true">
+    <application android:name="${applicationName}" android:label="@string/app_name" android:icon="@mipmap/launcher_icon" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true" android:allowBackup="false" android:fullBackupContent="false" android:largeHeap="true">
 
 
         <activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
         <activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
             <intent-filter>
             <intent-filter>

二进制
android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png


二进制
android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png


二进制
android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png


二进制
android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png


二进制
android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png


+ 5 - 0
android/app/src/main/res/mipmap-anydpi-v26/launcher_icon.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+  <background android:drawable="@color/ic_launcher_background"/>
+  <foreground android:drawable="@drawable/ic_launcher_foreground"/>
+</adaptive-icon>

二进制
android/app/src/main/res/mipmap-hdpi/launcher_icon.png


二进制
android/app/src/main/res/mipmap-mdpi/launcher_icon.png


二进制
android/app/src/main/res/mipmap-xhdpi/launcher_icon.png


二进制
android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png


二进制
android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png


+ 1 - 0
android/app/src/main/res/values/colors.xml

@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 <resources>
     <color name="splash_color">#000000</color>
     <color name="splash_color">#000000</color>
+	<color name="ic_launcher_background">#ffffff</color>
 </resources>
 </resources>

二进制
assets/android_icon.png


二进制
assets/icon-light-curved.png


二进制
assets/ios_icon.png


二进制
assets/launcher_icon/ente-foreground.png


+ 1 - 1
ios/Runner.xcodeproj/project.pbxproj

@@ -754,4 +754,4 @@
 /* End XCConfigurationList section */
 /* End XCConfigurationList section */
 	};
 	};
 	rootObject = 97C146E61CF9000F007C117D /* Project object */;
 	rootObject = 97C146E61CF9000F007C117D /* Project object */;
-}
+}

+ 4 - 3
pubspec.yaml

@@ -126,10 +126,11 @@ dev_dependencies:
   lints: ^1.0.1
   lints: ^1.0.1
 
 
 flutter_icons:
 flutter_icons:
-  android: true
-  image_path_android: "assets/icon-light-curved.png"
+  android: "launcher_icon"
+  adaptive_icon_foreground: "assets/launcher_icon/ente-foreground.png"
+  adaptive_icon_background: "#ffffff"
   ios: true
   ios: true
-  image_path_ios: "assets/icon-light.png"
+  image_path: "assets/icon-light.png"
 
 
 flutter_native_splash:
 flutter_native_splash:
   color: "#ffffff"
   color: "#ffffff"