1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-21 22:31:16 +02:00

Use a vector resource instead of the raster background image

Create a specific splash file for android version <21 without the drawable
This commit is contained in:
Daniele Gobbetti 2018-08-01 21:52:35 +02:00
parent a356c1f7bd
commit c708bc6e52
5 changed files with 26 additions and 7 deletions

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@color/primary_dark"/>
<item
android:gravity="center"
android:drawable="@drawable/gadgetbridge_img"/>
</layer-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="233dp"
android:height="341dp"
android:viewportWidth="950"
android:viewportHeight="1403">
<path
android:strokeColor="#edededed"
android:strokeWidth="15"
android:pathData="m 391.43859,251.50005 c -16.53,-0.137 -32.726,-5.052 -49,-7.576 -31.323,-4.857 -62.605,-10.178 -94,-14.554 -11.339,-1.581 -22.657,-3.315 -34,-4.87 -3.544,-0.486 -9.985,-0.271 -11.683,-4.148 -2.661,-6.074 3.215,-15.79 5.989,-20.852 9.17,-16.735 19.424,-32.9 29.641,-49 26.589,-41.901 56.623,-85.122998 95.053,-117.079498 25.306,-21.0432 54.596,-33.5442995 87,-20.4675 13.073,5.2758 24.874,14.0363 34.155,24.5477 7.445,8.4313 14.372,18.1763 17.816,28.9993 4.549,14.294 11.03,39.431998 4.977,53.999998 -5.502,13.241 -20.399,23.207 -29.662,34 -15.779,18.385 -28.437,38.888 -40.147,60 -5.488,9.893 -15.517,24.17 -14.96,35.981 0.352,7.455 22.806,13.067 28.821,16.328 21.17,11.476 40.695,28.364 50.688,50.691 18.396,41.106 -0.666,100.512 -34.689,128.535 -10.354,8.529 -23.218,13.179 -35.999,16.72 -35.687,9.887 -74.001,0.29 -110,-1.255 -1.397,17.704 -4.591,36.596 0.774,54 9.793,31.77 49.168,55.388 82.226,47.402 32.92,-7.953 54.022,-37.177 77.089,-59.294 4.322,-4.143 10.976,-4.135 15.068,-8.032 5.051,-4.808 6.756,-15.863 10.027,-22.076 5.03,-9.552 12.956,-18.21 19.237,-27 38.268,-53.553 71.679,-110.568 103.719,-168 8.826,-15.821 17.512,-31.797 25.613,-48 2.811,-5.621 4.461,-16.206 8.76,-20.486 4.169,-4.15 13.161,-3.887 18.487,-6.306 37.106,-16.857 75.799,-10.058 105,18.796 6.41,6.338 13.31,12.628 17.1,20.996 16.27,36.011 -0.86,79.314 -13.68,113 -22.504,59.169 -57.511,114.154 -93.395,166 -5.988,8.652 -6.819,20.868 -12.868,28.725 -3.998,5.193 -12.115,6 -16.718,11.29 -10.773,12.382 -20.651,27.824 -34.439,37.135 -26.994,18.228 -73.227,17.881 -101,2.538 -26.893,-14.858 -32.245,-45.823 -33.625,-73.688 -0.499,-10.078 3.588,-22.701 -1.375,-32 m 12,-379 c 17.823,-3.679 32.752,-13.717 51,-16.561 38.387,-5.982998 78.04,16.748 92.547,52.561 7.349,18.142 5.142,37.032 10.453,55 m 21,344 c 8.3,11.537 3.861,33.142 7.746,47 11.464,40.889 48.099,57.862 88.254,49.331 56.57,-12.018 97.41,-63.857 127.67,-109.331 6.99,-10.507 12.44,-24.386 20.96,-33.61 2.88,-3.112 10.21,-7.578 14.05,-4.029 5.94,5.48 3.32,26.012 3.32,33.639 0,32.985 0.29,66.193 -2.83,99 -5.99,62.921 -7.24,134.76 -42.22,190 -11.86,18.728 -29.51,34.487 -45.95,49.166 -32.43,28.959 -66.94,55.856 -103,80.164 -15.844,10.68 -34.304,20 -48.891,32.28 -5.808,4.89 -4.109,13.58 -4.109,20.38995 v 54 c 0,5.29 2.607,20.69 -2.318,23.97 -4.938,3.3 -16.896,1.03 -22.682,1.03 h -58 -221 -63 c -6.208,0 -19.404,2.49 -24.682,-1.03 -5.401,-3.6 -2.318,-23.03 -2.318,-28.97 0,-21.69 5.279,-56.44995 -8.804,-73.99995 -71.457,-89.076 -142.179,-180.028 -199.620003,-279 -24.185,-41.671 -53.67,-88.059 -58.406,-137 -9.29400002,-96.034 42.012,-191.579 91.777003,-270 12.162,-19.166 25.178,-38.033 39.064,-56 4.758,-6.156 9.917,-16.188 17.004,-19.821 11.35,-5.818 31.627,1.813 43.985,1.821 m 576,99 c 44.15,-9.108 86.54,-30.774 128,0.375 7.04,5.292 12.9,11.496 18.08,18.625 6.29,8.669 10.42,17.756 13.34,28 3.2,11.222 6.24,23.209 5.49,35 -1.67,26.166 -15.3,46.19 -24.44,70 -3.25,8.446 -3.75,18.156 -5.47,27 m -746,-75 c 27.091,12.008 57.317,19.456 86,26.627 12.377,3.094 29.002,4.03 40,10.373 m -16,621.99995 c -12.048,6.43 -35.402,2 -49,2 -3.938,0 -14.254,-1.83 -16.972,1.6 -1.8,2.28 -1.028,6.71 -1.028,9.4 v 25 96 28 c 0.001,2.88 -0.841,7.84 2.318,9.4 9.22,4.53 29.381,0.6 39.682,0.6 h 98 276 84 c 11.273,0 27.059,2.89 37.852,-0.32 4.03,-1.19 3.147,-6.39 3.148,-9.68 v -28 -96 -25 c 0,-2.69 0.772,-7.12 -1.028,-9.4 -3.055,-3.85 -16.446,-1.6 -20.972,-1.6 -17.678,0 -41.071,4 -58,-1 m -324,40.42 c 20.064,-2.63 41.761,-0.42 62,-0.42 h 121 64 c 12.293,0 26.031,-1.26 38,2.06 8.262,2.29 11.04,9.28 12.385,16.94 2.832,16.13 2.326,37.74 0.329,54 -0.937,7.63 -2.603,15.93 -10.714,18.97 -8.04,3.01 -17.597,2.03 -26,2.03 h -45 -155 -51 c -8.672,0 -18.869,1.13 -26.985,-2.65 -11.262,-5.25 -9.015,-23.28 -9.015,-33.35 0,-13.97 -5.538,-43.55 7.105,-53.2 5.351,-4.08 12.571,-3.54 18.895,-4.38 m -63,131.58 v 101 26 l 1.028,10.4 20.972,1.6 h 63 224 56 l 20.397,-1.6 1.603,-10.4 v -25 -102"
/>
</vector>

View File

@ -4,10 +4,4 @@
<item
android:drawable="@color/primary_dark"/>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/gadgetbridge_img"/>
</item>
</layer-list>

View File

@ -15,7 +15,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/gadgetbridge_img" />
android:alpha="0.1"
android:tint="?attr/textColorPrimary"
app:srcCompat="@drawable/gadgetbridge_img" />
<android.support.v7.widget.RecyclerView
android:id="@+id/deviceListView"