Skip to content

Commit

Permalink
Add Adaptive Icon For API 26+ (#450)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
RaafatAkkad authored and SyncedSynapse committed Nov 11, 2017
1 parent b764fc6 commit fa67964
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sudo: false

env:
matrix:
- ANDROID_TARGET=android-25
- ANDROID_TARGET=android-26
global:
- GRADLE_OPTS="-Xms128m"

Expand All @@ -16,10 +16,10 @@ android:
# See https://github.com/travis-ci/travis-ci/issues/5036
- tools
# needed build tools
- build-tools-26.0.1
- build-tools-26.0.2

# The SDK version used to compile your project
- android-25
- android-26

# extra needed components
- extra-android-m2repository
Expand Down
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ def getVersionName = { ->


android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
compileSdkVersion 26
buildToolsVersion "26.0.2"

defaultConfig {
applicationId "org.xbmc.kore"
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 26
versionCode 18
versionName = getVersionName()
}
Expand Down Expand Up @@ -106,7 +106,7 @@ android {
}

ext {
supportLibVersion = '25.0.1'
supportLibVersion = '26.1.0'
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">

<!-- Activities -->
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/color/ic_launcher_shadow.xml
Original file line number Diff line number Diff line change
@@ -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>
30 changes: 30 additions & 0 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ImageView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/ic_launcher"
android:src="@mipmap/ic_launcher"
android:contentDescription="@string/app_name"/>

<TextView
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/list_item_navigation_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
android:layout_marginRight="@dimen/default_padding"
android:layout_centerVertical="true"
android:tint="?attr/defaultButtonColorFilter"
android:src="@drawable/ic_launcher"/>
android:src="@mipmap/ic_launcher"/>

<TextView
android:id="@+id/drawer_item_title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
android:layout_marginLeft="@dimen/default_padding"
android:layout_marginRight="@dimen/default_padding"
android:layout_centerVertical="true"
android:src="@drawable/ic_launcher"/>
android:src="@mipmap/ic_launcher"/>

<TextView
android:id="@+id/drawer_item_title"
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -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>
4 changes: 4 additions & 0 deletions app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#0BB1E6</color>
</resources>
101 changes: 101 additions & 0 deletions art/launcher/v26/ic_launcher_foreground.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}

0 comments on commit fa67964

Please sign in to comment.