Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android8.0自适应图标无法显示 #364

Open
shadowline opened this issue Aug 17, 2019 · 0 comments
Open

Android8.0自适应图标无法显示 #364

shadowline opened this issue Aug 17, 2019 · 0 comments

Comments

@shadowline
Copy link

AndroidManifest设置
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
ic_launcher.xml
<?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@drawable/ic_launcher_background" /> <foreground android:drawable="@drawable/ic_launcher_foreground" /> </adaptive-icon>
ic_launcher_background.xml
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108"> <path android:pathData="M0,0h108v108h-108z" android:strokeWidth="1" android:fillType="evenOdd" android:strokeColor="#00000000"> <aapt:attr name="android:fillColor"> <gradient android:startY="93.65109" android:startX="54" android:endY="14.929093" android:endX="54" android:type="linear"> <item android:offset="0" android:color="#FFFC3461"/> <item android:offset="1" android:color="#FFFD4082"/> </gradient> </aapt:attr> </path> </vector>
ic_launcher_foreground.xml
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108"> <path android:pathData="M80.581,53.34C82.341,54.797 83.309,56.999 83.191,59.28C83.191,63.74 81.241,66.65 77.721,67.47L77.601,67.47C76.923,67.735 76.157,67.647 75.556,67.234C74.955,66.822 74.598,66.139 74.601,65.41L74.601,53.92C74.601,53.86 74.601,53.8 74.601,53.73C74.479,45.847 69.964,38.693 62.901,35.19C57.326,32.513 50.837,32.513 45.261,35.19C38.199,38.693 33.684,45.847 33.561,53.73C33.561,53.8 33.561,53.86 33.561,53.92L33.561,65.38C33.556,66.591 32.573,67.57 31.361,67.57C31.102,67.571 30.845,67.527 30.601,67.44L30.481,67.44C26.951,66.62 25.011,63.71 25.011,59.25C24.884,56.993 25.82,54.806 27.541,53.34C28.401,52.653 29.396,52.155 30.461,51.88C31.194,43.46 36.282,36.039 43.871,32.32C47.05,30.79 50.534,29.997 54.061,30C57.589,29.997 61.072,30.79 64.251,32.32C71.841,36.039 76.929,43.46 77.661,51.88C78.727,52.155 79.722,52.653 80.581,53.34ZM54.061,37.74C59.215,37.729 64.161,39.766 67.812,43.403C71.464,47.039 73.521,51.977 73.531,57.13C73.531,67.828 64.866,76.505 54.168,76.52C43.47,76.534 34.781,67.881 34.752,57.183C34.722,46.485 43.363,37.784 54.061,37.74ZM41.781,57.74L41.791,57.77L38.461,53.09L36.461,53.09L36.461,61.13L38.461,61.13L38.461,56.54L40.531,59.46L41.531,58.09L41.781,57.74ZM44.651,61.14L44.621,53.12L42.621,53.12L40.941,55.49L42.211,57.17L42.651,56.55L42.651,61.14L44.651,61.14ZM53.651,57.69L53.601,53.09L51.601,53.09L51.601,57.39C51.601,58.362 50.813,59.15 49.841,59.15C48.925,59.15 48.181,58.407 48.181,57.49L48.181,53.09L46.181,53.09L46.181,57.72C46.181,59.609 47.713,61.14 49.601,61.14L50.201,61.14C52.107,61.14 53.651,59.595 53.651,57.69ZM57.481,61.14L57.451,61.17C59.551,61.17 60.631,60.01 60.631,58.62C60.631,57.23 59.631,56.68 58.631,56.31C57.831,56.03 57.131,55.75 57.131,55.39C57.131,55.03 57.401,54.84 57.941,54.84C58.527,54.895 59.083,55.121 59.541,55.49L60.641,54.05C59.86,53.416 58.888,53.064 57.881,53.05C56.071,53.05 54.881,54.04 54.881,55.5C54.881,56.76 56.091,57.44 56.881,57.76C57.671,58.08 58.411,58.38 58.411,58.76C58.411,59.14 58.141,59.37 57.501,59.37C56.78,59.324 56.094,59.039 55.551,58.56L54.481,60.06C55.337,60.738 56.39,61.117 57.481,61.14ZM63.941,61.14L63.941,53.09L61.831,53.09L61.831,61.14L63.941,61.14ZM69.941,59.24L69.941,59.25C68.92,59.254 68.037,58.535 67.835,57.534C67.633,56.532 68.167,55.527 69.11,55.134C70.054,54.742 71.143,55.071 71.711,55.92L71.711,53.45C70.981,53.225 70.225,53.097 69.461,53.07C67.23,53.07 65.421,54.879 65.421,57.11C65.421,59.341 67.23,61.15 69.461,61.15C70.225,61.123 70.981,60.995 71.711,60.77L71.711,58.3C71.315,58.889 70.651,59.241 69.941,59.24Z" android:strokeWidth="1" android:fillColor="#FFFFFF" android:fillType="evenOdd" android:strokeColor="#00000000"/> </vector>
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant