From b0e6d329f3d37e0cf6a11a00286ff92a5f156777 Mon Sep 17 00:00:00 2001 From: Martijn Brekhof Date: Fri, 22 Dec 2017 19:20:41 +0100 Subject: [PATCH] Fixed lint errors (#491) Lint is complaining about the new launcher icons in 'res/mipmap-anydpi-v26' are not in PNG format. These are now defined in XML and lint is probably not aware of the new XML format for API v26 and higher. This also fixes usage of "android:layout_marginEnd". Which is only supported from API v17. Added running lintFullRelease to travis-CI build. --- .travis.yml | 2 +- app/build.gradle | 7 ++++--- .../kore/ui/sections/video/TVShowProgressFragment.java | 1 + app/src/main/res/values-sw360dp-land/styles.xml | 1 - 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e97403e..4848ed2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,4 +27,4 @@ android: before_script: script: - - ./gradlew testFullDebugUnitTest assembleFullRelease + - ./gradlew lintFullRelease testFullDebugUnitTest assembleFullRelease diff --git a/app/build.gradle b/app/build.gradle index ec6328f..68cd169 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -83,9 +83,10 @@ android { // Too much trouble keeping all translations in sync disable 'MissingTranslation' - // okio generates a lint error which should be ignored. Demote it to warning - // See https://github.com/square/okio/issues/58 - warning 'InvalidPackage' + //The xml launcher icon introduced in API 26 causes lint to generate + //an error that the icon is not a PNG format + //This reduces the error to a warning + warning 'IconLauncherFormat' } // allprojects { diff --git a/app/src/main/java/org/xbmc/kore/ui/sections/video/TVShowProgressFragment.java b/app/src/main/java/org/xbmc/kore/ui/sections/video/TVShowProgressFragment.java index 841ab72..0644c56 100644 --- a/app/src/main/java/org/xbmc/kore/ui/sections/video/TVShowProgressFragment.java +++ b/app/src/main/java/org/xbmc/kore/ui/sections/video/TVShowProgressFragment.java @@ -259,6 +259,7 @@ public class TVShowProgressFragment extends AbstractAdditionalInfoFragment imple * * @param cursor Cursor with the data */ + @TargetApi(21) private void displaySeasonList(Cursor cursor) { TextView seasonsListTitle = (TextView) getActivity().findViewById(R.id.seasons_title); GridLayout seasonsList = (GridLayout) getActivity().findViewById(R.id.seasons_list); diff --git a/app/src/main/res/values-sw360dp-land/styles.xml b/app/src/main/res/values-sw360dp-land/styles.xml index f5543b7..c535888 100644 --- a/app/src/main/res/values-sw360dp-land/styles.xml +++ b/app/src/main/res/values-sw360dp-land/styles.xml @@ -4,7 +4,6 @@ @dimen/remote_size @dimen/remote_size @dimen/remote_content_hmargin - @dimen/remote_content_hmargin