Add Adaptive Icon For API 26+ (#450)

* Target Sdk Version 26
* Add Adaptive Icon For API 26+
* Update travis to compile against API 26
* Move SVG files to art/launcher/v26/ per CR
* Scale logo to 83%
* Update buildToolsVersion to 26.0.2
* Update travis build-tools to 26.0.2
This commit is contained in:
Raafat Akkad 2017-11-11 15:26:18 +00:00 committed by Synced Synapse
parent b764fc676c
commit fa6796475c
16 changed files with 161 additions and 11 deletions

View File

@ -4,7 +4,7 @@ sudo: false
env: env:
matrix: matrix:
- ANDROID_TARGET=android-25 - ANDROID_TARGET=android-26
global: global:
- GRADLE_OPTS="-Xms128m" - GRADLE_OPTS="-Xms128m"
@ -16,10 +16,10 @@ android:
# See https://github.com/travis-ci/travis-ci/issues/5036 # See https://github.com/travis-ci/travis-ci/issues/5036
- tools - tools
# needed build tools # needed build tools
- build-tools-26.0.1 - build-tools-26.0.2
# The SDK version used to compile your project # The SDK version used to compile your project
- android-25 - android-26
# extra needed components # extra needed components
- extra-android-m2repository - extra-android-m2repository

View File

@ -11,13 +11,13 @@ def getVersionName = { ->
android { android {
compileSdkVersion 25 compileSdkVersion 26
buildToolsVersion "26.0.1" buildToolsVersion "26.0.2"
defaultConfig { defaultConfig {
applicationId "org.xbmc.kore" applicationId "org.xbmc.kore"
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 25 targetSdkVersion 26
versionCode 18 versionCode 18
versionName = getVersionName() versionName = getVersionName()
} }
@ -106,7 +106,7 @@ android {
} }
ext { ext {
supportLibVersion = '25.0.1' supportLibVersion = '26.1.0'
} }
dependencies { dependencies {

View File

@ -15,7 +15,7 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"> android:label="@string/app_name">
<!-- Activities --> <!-- Activities -->

View File

@ -0,0 +1,7 @@
<gradient xmlns:android="http://schemas.android.com/apk/res/android"
android:centerX="67.5" android:centerY="67.5" android:gradientRadius="76.37" android:type="radial">
<item android:color="#15000000" android:offset="0.0" />
<item android:color="#10000000" android:offset="0.32" />
<item android:color="#05000000" android:offset="0.62" />
<item android:color="#00000000" android:offset="1.0" />
</gradient>

View File

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportHeight="135.46667"
android:viewportWidth="135.46666">
<path
android:fillAlpha="1"
android:fillColor="@color/ic_launcher_shadow"
android:pathData="M125.18,96.5l-11.79,11.79l-46.77,-46.77l11.79,-11.79z" />
<path
android:fillAlpha="1"
android:fillColor="@color/ic_launcher_shadow"
android:pathData="M108.28,113.39l-11.79,11.79l-46.77,-46.77l11.79,-11.79z" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m90.79,73.55c-3.4,3.41 -5.29,5.15 -5.7,5.24 -0.36,0.08 -0.86,-0 -1.22,-0.19 -0.34,-0.18 -2.77,-2.49 -5.4,-5.13 -4.77,-4.8 -4.78,-4.81 -4.78,-5.77 0,-0.96 0.01,-0.97 4.78,-5.77 2.63,-2.64 5.06,-4.95 5.4,-5.13 0.37,-0.19 0.87,-0.27 1.22,-0.19 0.4,0.09 2.3,1.83 5.7,5.24 4.64,4.66 5.09,5.18 5.09,5.86 -0,0.68 -0.45,1.2 -5.09,5.86z" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m78.76,85.38c-0.1,0.24 -2.45,2.69 -5.21,5.44 -4.58,4.55 -5.09,5 -5.78,5 -0.68,0 -1.2,-0.45 -5.85,-5.09 -3.41,-3.4 -5.15,-5.29 -5.24,-5.69 -0.08,-0.36 0,-0.86 0.19,-1.22 0.18,-0.34 2.49,-2.77 5.13,-5.4 4.8,-4.77 4.81,-4.78 5.77,-4.78 0.96,-0 0.97,0.01 5.77,4.77 2.64,2.63 4.94,5.04 5.12,5.37 0.35,0.66 0.37,0.96 0.1,1.6z" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m78.56,51.78c-0.23,0.36 -2.54,2.76 -5.13,5.33 -6.24,6.19 -5.09,6.2 -11.44,-0.11 -2.64,-2.63 -4.95,-5.05 -5.13,-5.39 -0.19,-0.37 -0.27,-0.87 -0.19,-1.22 0.09,-0.4 1.83,-2.3 5.24,-5.69 4.66,-4.65 5.17,-5.09 5.86,-5.09 0.68,-0 1.19,0.44 5.86,5.1 5.53,5.52 5.74,5.82 4.93,7.08z" />
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m57.06,73.47c-2.63,2.64 -5.06,4.95 -5.4,5.13 -0.37,0.19 -0.87,0.27 -1.22,0.19 -0.4,-0.09 -2.3,-1.83 -5.7,-5.24 -4.64,-4.66 -5.09,-5.18 -5.09,-5.86 -0,-0.68 0.45,-1.2 5.09,-5.86 3.4,-3.41 5.29,-5.15 5.7,-5.24 0.36,-0.08 0.86,0 1.22,0.19 0.34,0.18 2.77,2.49 5.4,5.13 4.77,4.8 4.78,4.81 4.78,5.77 0,0.96 -0.01,0.97 -4.78,5.77z" />
</vector>

View File

@ -19,7 +19,7 @@
<ImageView <ImageView
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:src="@drawable/ic_launcher" android:src="@mipmap/ic_launcher"
android:contentDescription="@string/app_name"/> android:contentDescription="@string/app_name"/>
<TextView <TextView

View File

@ -28,7 +28,7 @@
android:layout_marginRight="@dimen/default_padding" android:layout_marginRight="@dimen/default_padding"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:tint="?attr/defaultButtonColorFilter" android:tint="?attr/defaultButtonColorFilter"
android:src="@drawable/ic_launcher"/> android:src="@mipmap/ic_launcher"/>
<TextView <TextView
android:id="@+id/drawer_item_title" android:id="@+id/drawer_item_title"

View File

@ -42,7 +42,7 @@
android:layout_marginLeft="@dimen/default_padding" android:layout_marginLeft="@dimen/default_padding"
android:layout_marginRight="@dimen/default_padding" android:layout_marginRight="@dimen/default_padding"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:src="@drawable/ic_launcher"/> android:src="@mipmap/ic_launcher"/>
<TextView <TextView
android:id="@+id/drawer_item_title" android:id="@+id/drawer_item_title"

View File

@ -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>

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#0BB1E6</color>
</resources>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg4569"
version="1.1"
viewBox="0 0 135.46666 135.46667"
height="512"
width="512"
sodipodi:docname="ic_launcher_foreground.svg"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
inkscape:label="Logo">
<metadata
id="metadata4490">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1842"
inkscape:window-height="1051"
id="namedview4517"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="256"
inkscape:cy="256"
inkscape:window-x="69"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:pagecheckerboard="true" />
<defs
id="defs4563" />
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Shadow"
style="display:inline">
<rect
y="-156.75055"
x="-20.281872"
height="66.145798"
width="16.668749"
id="rect831"
style="fill:#000000;fill-opacity:1"
transform="rotate(135)" />
<rect
y="-156.75058"
x="3.6131747"
height="66.145798"
width="16.668749"
id="rect831-8"
style="fill:#000000;fill-opacity:1"
transform="rotate(135)" />
</g>
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Logo"
style="display:inline">
<path
inkscape:connector-curvature="0"
id="path839"
d="m 90.788011,73.553914 c -3.399941,3.411255 -5.293086,5.153588 -5.695585,5.241996 -0.355613,0.07813 -0.857265,-0.0017 -1.223047,-0.194517 -0.34108,-0.179814 -2.770241,-2.489605 -5.398137,-5.132862 -4.770774,-4.798677 -4.777996,-4.807384 -4.777995,-5.771639 0,-0.964243 0.0075,-0.972962 4.777995,-5.771638 2.627898,-2.643256 5.057057,-4.953042 5.398146,-5.132865 0.365781,-0.192832 0.867433,-0.272613 1.223046,-0.194508 0.402501,0.0884 2.295615,1.830755 5.695585,5.241994 4.644782,4.660183 5.092686,5.175318 5.092688,5.857015 -7e-6,0.6817 -0.4479,1.19683 -5.092696,5.857024 z"
style="fill:#ffffff;fill-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path837"
d="m 78.757409,85.375382 c -0.10233,0.241602 -2.448815,2.688228 -5.214425,5.436946 -4.579995,4.552021 -5.09498,4.997683 -5.775355,4.997891 -0.681198,2.07e-4 -1.196711,-0.448005 -5.853451,-5.089344 -3.409173,-3.397859 -5.150393,-5.289892 -5.238645,-5.692247 -0.07794,-0.355475 0.0017,-0.85699 0.194835,-1.222725 0.179861,-0.341028 2.489676,-2.770147 5.132926,-5.398041 4.798653,-4.770778 4.807367,-4.777994 5.771323,-4.778286 0.963945,-2.93e-4 0.972652,0.0071 5.768401,4.774769 2.641646,2.626288 4.943723,5.04187 5.115721,5.367985 0.350401,0.664369 0.368902,0.964982 0.09867,1.603052 z"
style="fill:#ffffff;fill-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path835"
d="m 78.562949,51.777976 c -0.232829,0.362371 -2.5399,2.759147 -5.126819,5.326169 -6.239891,6.191892 -5.089709,6.202657 -11.436263,-0.106984 -2.641483,-2.626124 -4.949688,-5.053689 -5.129333,-5.394578 -0.192676,-0.365575 -0.272299,-0.866993 -0.194138,-1.222468 0.08846,-0.402353 1.830532,-2.295087 5.241152,-5.694435 4.662641,-4.64724 5.173969,-5.091789 5.856986,-5.091954 0.683381,-1.66e-4 1.192237,0.44307 5.859551,5.103883 5.525476,5.517839 5.737343,5.822111 4.928864,7.080367 z"
style="fill:#ffffff;fill-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path4542"
d="m 57.06399,73.468531 c -2.627898,2.643256 -5.057054,4.953052 -5.398137,5.132862 -0.365781,0.192832 -0.867433,0.272622 -1.223047,0.194517 -0.402493,-0.08841 -2.295622,-1.830764 -5.695584,-5.241996 -4.644795,-4.660195 -5.092695,-5.175327 -5.09269,-5.857025 -8e-6,-0.681698 0.447902,-1.196829 5.092689,-5.857014 3.399944,-3.411257 5.293082,-5.153598 5.695577,-5.241994 0.355613,-0.07813 0.857274,0.0017 1.223046,0.194508 0.341088,0.179823 2.77025,2.489609 5.398146,5.132865 4.770785,4.798674 4.777994,4.807396 4.777994,5.771639 0,0.964252 -0.0075,0.972961 -4.777994,5.771638 z"
style="fill:#ffffff;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -15,5 +15,8 @@ buildscript {
allprojects { allprojects {
repositories { repositories {
jcenter() jcenter()
maven {
url "https://maven.google.com"
}
} }
} }