Skip to content

Commit

Permalink
Fixed lint errors (#491)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
poisdeux authored and SyncedSynapse committed Dec 22, 2017
1 parent 8daa342 commit b0e6d32
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ android:
before_script:

script:
- ./gradlew testFullDebugUnitTest assembleFullRelease
- ./gradlew lintFullRelease testFullDebugUnitTest assembleFullRelease
7 changes: 4 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public void onClick(View v) {
*
* @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);
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-sw360dp-land/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<item name="android:layout_width">@dimen/remote_size</item>
<item name="android:layout_height">@dimen/remote_size</item>
<item name="android:layout_marginRight">@dimen/remote_content_hmargin</item>
<item name="android:layout_marginEnd">@dimen/remote_content_hmargin</item>
</style>

<style name="ControlPad">
Expand Down

0 comments on commit b0e6d32

Please sign in to comment.