Extract vector-to-be-animated to separate file

This commit is contained in:
Kirill Kamakin
2022-11-03 20:38:10 +01:00
parent db4aaf0bbd
commit b6d077bfb0
2 changed files with 51 additions and 28 deletions

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="132dp"
android:height="97dp"
android:viewportWidth="132"
android:viewportHeight="97">
<group android:name="breadLow">
<path
android:fillColor="#FF9431"
android:pathData="M126.56,24.09L126.52,24.16C131.12,34.96 126.85,47.59 113.14,58.21C90.38,75.82 50.26,81.17 23.52,70.14C7.4,63.48 -0.17,52.38 1.36,40.76C-0.87,51.29 2.53,68.12 6.97,75.56C10.46,81.64 16.93,87 26.29,90.86C39.6,96.35 56.23,97.78 72.37,95.67C88.66,93.51 104.46,87.75 115.89,78.93C124.58,72.2 129.48,64.66 130.73,57.28C132.58,49.63 131.11,32.96 126.56,24.09Z" />
<path
android:fillColor="#FF9431"
android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z" />
<path
android:fillAlpha="0.3"
android:fillColor="#ffffff"
android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z"
android:strokeAlpha="0.3" />
<path
android:fillAlpha="0.1"
android:fillColor="#000000"
android:pathData="M116.38,76.1C105.42,84.61 91.69,88.96 77.94,90.8C61.81,92.96 44.94,91.76 30.12,85.04C17.95,79.54 7.32,70.03 1.46,58.14C2.55,65.02 4.61,71.6 6.96,75.53C10.45,81.61 16.92,86.97 26.28,90.84C39.6,96.32 56.23,97.75 72.36,95.64C88.65,93.48 104.45,87.72 115.89,78.91C123.5,73.01 128.21,66.48 130.09,60C126.67,66.25 122,71.73 116.38,76.1Z"
android:strokeAlpha="0.1" />
<path
android:fillColor="#ffffff"
android:pathData="M107.52,15.62C111.12,17.11 107.6,21.38 102.99,20.3C94.25,18.28 85.57,16.16 76.67,14.34C71.5,13.28 58.08,9.79 55.5,15.93C54.84,17.52 56.06,18.67 58.16,19.53C61.97,21.11 68.63,21.69 71.92,22.04C79.29,22.82 86.89,23.09 94.19,23.99C99.38,24.58 104.47,25.82 109.36,27.67C115.48,30.2 119.23,33.93 114.48,38.97C106,47.97 88.43,46.78 76.79,43.73C73.03,42.72 69.35,41.45 65.76,39.93C63.92,39.18 62.11,38.38 60.3,37.6C58.5,36.81 56.7,36.02 54.86,35.27C50.58,33.44 46.15,31.99 41.61,30.95C36.64,29.83 28.05,27.91 23.2,31.33C17.71,35.22 22.43,38.49 27.24,40.47C37.78,44.79 51.05,46 63.46,48.15C69.54,49.11 75.52,50.63 81.32,52.69C82.25,53.04 83.23,53.41 84.2,53.81C88.09,55.42 91.96,57.52 92.17,60.47C92.46,64.71 85.54,68.52 78.76,69.48C71.43,70.51 64,69.19 58.03,67.4C55.72,66.68 53.52,65.87 51.37,64.98C49.93,64.38 48.49,63.76 47.05,63.14C45.61,62.53 44.17,61.89 42.73,61.29C36.65,58.78 30.21,56.73 21.81,56.97C21.05,57.02 20.29,56.91 19.57,56.64C16.87,55.53 18.74,51.96 23.34,51.83C31.06,51.64 38.73,53.03 45.9,55.9C46.42,56.1 46.93,56.31 47.44,56.53C49.08,57.2 50.67,57.91 52.25,58.62C53.84,59.34 55.39,60.02 57,60.68C59.46,61.72 61.98,62.59 64.55,63.27C68.3,64.29 72.18,64.75 76.07,64.63C78.86,64.52 84.09,63.19 83.35,61.09C83.02,60.14 81.38,59.28 79.64,58.56C78.33,58.02 76.96,57.56 76.04,57.21C72.96,56.06 69.81,55.13 66.6,54.43C54.69,51.75 41.46,50.83 29.97,47.66C26.94,46.86 23.96,45.88 21.04,44.73C18.54,43.79 16.24,42.42 14.22,40.67C10.73,37.34 11.55,32.79 15.86,29.15C25.71,20.82 44.03,25.11 53.94,28.51C56.1,29.23 58.19,30.07 60.23,30.91C61.89,31.59 63.53,32.3 65.16,33C66.78,33.7 68.37,34.38 69.99,35.05C76.04,37.55 82.37,39.76 90.15,40.67C96.05,41.39 104.08,40.93 107.24,36.7C108.71,34.73 106.73,33.16 103.92,32.01C101.53,31.09 99.05,30.4 96.53,29.93C84.16,27.45 69.86,28.2 57.71,25.34C55.88,24.93 54.09,24.37 52.35,23.68C48.48,22.09 45.87,19.79 46.67,16.41C47.67,12.09 54.3,8.25 61.5,7.39C69.19,6.47 77.11,8.74 83.69,10.17C91.38,11.83 98.97,13.64 106.58,15.39C106.9,15.44 107.21,15.52 107.52,15.62Z" />
</group>
</vector>

View File

@@ -1,30 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="132dp" android:width="132dp"
android:height="97dp" android:height="97dp"
android:viewportWidth="315" android:viewportWidth="132"
android:viewportHeight="231"> android:viewportHeight="97">
<path
<group android:fillColor="#FF9431"
android:name="yAnimationGroup" android:pathData="M126.56,24.09L126.52,24.16C131.12,34.96 126.85,47.59 113.14,58.21C90.38,75.82 50.26,81.17 23.52,70.14C7.4,63.48 -0.17,52.38 1.36,40.76C-0.87,51.29 2.53,68.12 6.97,75.56C10.46,81.64 16.93,87 26.29,90.86C39.6,96.35 56.23,97.78 72.37,95.67C88.66,93.51 104.46,87.75 115.89,78.93C124.58,72.2 129.48,64.66 130.73,57.28C132.58,49.63 131.11,32.96 126.56,24.09Z" />
android:translateX="90"> <path
<path android:fillColor="#FF9431"
android:fillColor="#FF9431" android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z" />
android:pathData="M126.56,24.09L126.52,24.16C131.12,34.96 126.85,47.59 113.14,58.21C90.38,75.82 50.26,81.17 23.52,70.14C7.4,63.48 -0.17,52.38 1.36,40.76C-0.87,51.29 2.53,68.12 6.97,75.56C10.46,81.64 16.93,87 26.29,90.86C39.6,96.35 56.23,97.78 72.37,95.67C88.66,93.51 104.46,87.75 115.89,78.93C124.58,72.2 129.48,64.66 130.73,57.28C132.58,49.63 131.11,32.96 126.56,24.09Z" /> <path
<path android:fillAlpha="0.3"
android:fillColor="#FF9431" android:fillColor="#ffffff"
android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z" /> android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z"
<path android:strokeAlpha="0.3" />
android:fillAlpha="0.3" <path
android:fillColor="#ffffff" android:fillAlpha="0.1"
android:pathData="M23.52,70.14C50.26,81.17 90.38,75.82 113.14,58.21C126.82,47.59 131.14,34.96 126.52,24.16C123.48,17.04 116.57,10.72 105.94,6.34C79.2,-4.69 39.08,0.65 16.32,18.27C7.3,25.25 2.36,33.12 1.36,40.76C-0.17,52.38 7.4,63.48 23.52,70.14Z" android:fillColor="#000000"
android:strokeAlpha="0.3" /> android:pathData="M116.38,76.1C105.42,84.61 91.69,88.96 77.94,90.8C61.81,92.96 44.94,91.76 30.12,85.04C17.95,79.54 7.32,70.03 1.46,58.14C2.55,65.02 4.61,71.6 6.96,75.53C10.45,81.61 16.92,86.97 26.28,90.84C39.6,96.32 56.23,97.75 72.36,95.64C88.65,93.48 104.45,87.72 115.89,78.91C123.5,73.01 128.21,66.48 130.09,60C126.67,66.25 122,71.73 116.38,76.1Z"
<path android:strokeAlpha="0.1" />
android:fillAlpha="0.1" <path
android:fillColor="#000000" android:fillColor="#ffffff"
android:pathData="M116.38,76.1C105.42,84.61 91.69,88.96 77.94,90.8C61.81,92.96 44.94,91.76 30.12,85.04C17.95,79.54 7.32,70.03 1.46,58.14C2.55,65.02 4.61,71.6 6.96,75.53C10.45,81.61 16.92,86.97 26.28,90.84C39.6,96.32 56.23,97.75 72.36,95.64C88.65,93.48 104.45,87.72 115.89,78.91C123.5,73.01 128.21,66.48 130.09,60C126.67,66.25 122,71.73 116.38,76.1Z" android:pathData="M107.52,15.62C111.12,17.11 107.6,21.38 102.99,20.3C94.25,18.28 85.57,16.16 76.67,14.34C71.5,13.28 58.08,9.79 55.5,15.93C54.84,17.52 56.06,18.67 58.16,19.53C61.97,21.11 68.63,21.69 71.92,22.04C79.29,22.82 86.89,23.09 94.19,23.99C99.38,24.58 104.47,25.82 109.36,27.67C115.48,30.2 119.23,33.93 114.48,38.97C106,47.97 88.43,46.78 76.79,43.73C73.03,42.72 69.35,41.45 65.76,39.93C63.92,39.18 62.11,38.38 60.3,37.6C58.5,36.81 56.7,36.02 54.86,35.27C50.58,33.44 46.15,31.99 41.61,30.95C36.64,29.83 28.05,27.91 23.2,31.33C17.71,35.22 22.43,38.49 27.24,40.47C37.78,44.79 51.05,46 63.46,48.15C69.54,49.11 75.52,50.63 81.32,52.69C82.25,53.04 83.23,53.41 84.2,53.81C88.09,55.42 91.96,57.52 92.17,60.47C92.46,64.71 85.54,68.52 78.76,69.48C71.43,70.51 64,69.19 58.03,67.4C55.72,66.68 53.52,65.87 51.37,64.98C49.93,64.38 48.49,63.76 47.05,63.14C45.61,62.53 44.17,61.89 42.73,61.29C36.65,58.78 30.21,56.73 21.81,56.97C21.05,57.02 20.29,56.91 19.57,56.64C16.87,55.53 18.74,51.96 23.34,51.83C31.06,51.64 38.73,53.03 45.9,55.9C46.42,56.1 46.93,56.31 47.44,56.53C49.08,57.2 50.67,57.91 52.25,58.62C53.84,59.34 55.39,60.02 57,60.68C59.46,61.72 61.98,62.59 64.55,63.27C68.3,64.29 72.18,64.75 76.07,64.63C78.86,64.52 84.09,63.19 83.35,61.09C83.02,60.14 81.38,59.28 79.64,58.56C78.33,58.02 76.96,57.56 76.04,57.21C72.96,56.06 69.81,55.13 66.6,54.43C54.69,51.75 41.46,50.83 29.97,47.66C26.94,46.86 23.96,45.88 21.04,44.73C18.54,43.79 16.24,42.42 14.22,40.67C10.73,37.34 11.55,32.79 15.86,29.15C25.71,20.82 44.03,25.11 53.94,28.51C56.1,29.23 58.19,30.07 60.23,30.91C61.89,31.59 63.53,32.3 65.16,33C66.78,33.7 68.37,34.38 69.99,35.05C76.04,37.55 82.37,39.76 90.15,40.67C96.05,41.39 104.08,40.93 107.24,36.7C108.71,34.73 106.73,33.16 103.92,32.01C101.53,31.09 99.05,30.4 96.53,29.93C84.16,27.45 69.86,28.2 57.71,25.34C55.88,24.93 54.09,24.37 52.35,23.68C48.48,22.09 45.87,19.79 46.67,16.41C47.67,12.09 54.3,8.25 61.5,7.39C69.19,6.47 77.11,8.74 83.69,10.17C91.38,11.83 98.97,13.64 106.58,15.39C106.9,15.44 107.21,15.52 107.52,15.62Z" />
android:strokeAlpha="0.1" />
<path
android:fillColor="#ffffff"
android:pathData="M107.52,15.62C111.12,17.11 107.6,21.38 102.99,20.3C94.25,18.28 85.57,16.16 76.67,14.34C71.5,13.28 58.08,9.79 55.5,15.93C54.84,17.52 56.06,18.67 58.16,19.53C61.97,21.11 68.63,21.69 71.92,22.04C79.29,22.82 86.89,23.09 94.19,23.99C99.38,24.58 104.47,25.82 109.36,27.67C115.48,30.2 119.23,33.93 114.48,38.97C106,47.97 88.43,46.78 76.79,43.73C73.03,42.72 69.35,41.45 65.76,39.93C63.92,39.18 62.11,38.38 60.3,37.6C58.5,36.81 56.7,36.02 54.86,35.27C50.58,33.44 46.15,31.99 41.61,30.95C36.64,29.83 28.05,27.91 23.2,31.33C17.71,35.22 22.43,38.49 27.24,40.47C37.78,44.79 51.05,46 63.46,48.15C69.54,49.11 75.52,50.63 81.32,52.69C82.25,53.04 83.23,53.41 84.2,53.81C88.09,55.42 91.96,57.52 92.17,60.47C92.46,64.71 85.54,68.52 78.76,69.48C71.43,70.51 64,69.19 58.03,67.4C55.72,66.68 53.52,65.87 51.37,64.98C49.93,64.38 48.49,63.76 47.05,63.14C45.61,62.53 44.17,61.89 42.73,61.29C36.65,58.78 30.21,56.73 21.81,56.97C21.05,57.02 20.29,56.91 19.57,56.64C16.87,55.53 18.74,51.96 23.34,51.83C31.06,51.64 38.73,53.03 45.9,55.9C46.42,56.1 46.93,56.31 47.44,56.53C49.08,57.2 50.67,57.91 52.25,58.62C53.84,59.34 55.39,60.02 57,60.68C59.46,61.72 61.98,62.59 64.55,63.27C68.3,64.29 72.18,64.75 76.07,64.63C78.86,64.52 84.09,63.19 83.35,61.09C83.02,60.14 81.38,59.28 79.64,58.56C78.33,58.02 76.96,57.56 76.04,57.21C72.96,56.06 69.81,55.13 66.6,54.43C54.69,51.75 41.46,50.83 29.97,47.66C26.94,46.86 23.96,45.88 21.04,44.73C18.54,43.79 16.24,42.42 14.22,40.67C10.73,37.34 11.55,32.79 15.86,29.15C25.71,20.82 44.03,25.11 53.94,28.51C56.1,29.23 58.19,30.07 60.23,30.91C61.89,31.59 63.53,32.3 65.16,33C66.78,33.7 68.37,34.38 69.99,35.05C76.04,37.55 82.37,39.76 90.15,40.67C96.05,41.39 104.08,40.93 107.24,36.7C108.71,34.73 106.73,33.16 103.92,32.01C101.53,31.09 99.05,30.4 96.53,29.93C84.16,27.45 69.86,28.2 57.71,25.34C55.88,24.93 54.09,24.37 52.35,23.68C48.48,22.09 45.87,19.79 46.67,16.41C47.67,12.09 54.3,8.25 61.5,7.39C69.19,6.47 77.11,8.74 83.69,10.17C91.38,11.83 98.97,13.64 106.58,15.39C106.9,15.44 107.21,15.52 107.52,15.62Z" />
</group>
</vector> </vector>