From 53bad09fb1e5bf1458ee823e23237f98d441d441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Mon, 8 Apr 2024 15:35:26 +0200 Subject: [PATCH] Fix some lint errors --- app/build.gradle | 2 +- app/lint.xml | 10 ++++++ app/src/main/AndroidManifest.xml | 8 ++--- .../activities/DiaryEntryActivity.java | 2 ++ .../res/layout-land/diaryentry_slide3.xml | 8 ++--- app/src/main/res/layout/diaryentry_slide3.xml | 8 ++--- .../main/res/layout/diaryentry_summary.xml | 10 +++--- app/src/main/res/layout/pdf_person.xml | 35 +++++++++---------- 8 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 app/lint.xml diff --git a/app/build.gradle b/app/build.gradle index daa1c9f..fe21eb4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,7 +23,7 @@ android { } namespace 'org.secuso.privacyfriendlypaindiary' lint { - abortOnError false + lintConfig = file("lint.xml") } compileOptions { diff --git a/app/lint.xml b/app/lint.xml new file mode 100644 index 0000000..e0fb1a8 --- /dev/null +++ b/app/lint.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 94f07ae..a69551b 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,6 +2,9 @@ + + + - - - - - \ No newline at end of file diff --git a/app/src/main/java/org/secuso/privacyfriendlypaindiary/activities/DiaryEntryActivity.java b/app/src/main/java/org/secuso/privacyfriendlypaindiary/activities/DiaryEntryActivity.java index 35bc446..38012c0 100644 --- a/app/src/main/java/org/secuso/privacyfriendlypaindiary/activities/DiaryEntryActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlypaindiary/activities/DiaryEntryActivity.java @@ -16,6 +16,7 @@ License, or (at your option) any later version. */ package org.secuso.privacyfriendlypaindiary.activities; +import android.annotation.SuppressLint; import android.app.AlertDialog; import android.app.FragmentManager; import android.content.DialogInterface; @@ -1156,6 +1157,7 @@ public boolean onOptionsItemSelected(MenuItem item) { } + @SuppressLint("MissingSuperCall") @Override public void onBackPressed() { if (changesMade) { diff --git a/app/src/main/res/layout-land/diaryentry_slide3.xml b/app/src/main/res/layout-land/diaryentry_slide3.xml index 3e66b4e..c0ddedf 100644 --- a/app/src/main/res/layout-land/diaryentry_slide3.xml +++ b/app/src/main/res/layout-land/diaryentry_slide3.xml @@ -78,9 +78,9 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" - android:tint="@color/yellow" app:srcCompat="@drawable/paindiary_person_fullbody" - android:visibility="gone"/> + android:visibility="gone" + app:tint="@color/yellow" /> @@ -109,9 +109,9 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" - android:tint="@color/yellow" app:srcCompat="@drawable/paindiary_person_fullbody" - android:visibility="gone"/> + android:visibility="gone" + app:tint="@color/yellow" /> diff --git a/app/src/main/res/layout/diaryentry_slide3.xml b/app/src/main/res/layout/diaryentry_slide3.xml index 0de9fdd..8283974 100644 --- a/app/src/main/res/layout/diaryentry_slide3.xml +++ b/app/src/main/res/layout/diaryentry_slide3.xml @@ -63,9 +63,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" - android:tint="@color/yellow" app:srcCompat="@drawable/paindiary_person_fullbody" - android:visibility="gone"/> + android:visibility="gone" + app:tint="@color/yellow" /> @@ -100,9 +100,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:adjustViewBounds="true" - android:tint="@color/yellow" app:srcCompat="@drawable/paindiary_person_fullbody" - android:visibility="gone"/> + android:visibility="gone" + app:tint="@color/yellow" /> diff --git a/app/src/main/res/layout/diaryentry_summary.xml b/app/src/main/res/layout/diaryentry_summary.xml index 560876c..f750c5a 100644 --- a/app/src/main/res/layout/diaryentry_summary.xml +++ b/app/src/main/res/layout/diaryentry_summary.xml @@ -1,5 +1,5 @@ - + android:visibility="gone" + app:tint="@color/yellow" /> @@ -193,9 +193,9 @@ android:layout_width="90dp" android:layout_height="220dp" android:scaleType="centerCrop" - android:tint="@color/yellow" app:srcCompat="@drawable/paindiary_person_fullbody" - android:visibility="gone" /> + android:visibility="gone" + app:tint="@color/yellow" /> diff --git a/app/src/main/res/layout/pdf_person.xml b/app/src/main/res/layout/pdf_person.xml index c990d44..2f6cbef 100644 --- a/app/src/main/res/layout/pdf_person.xml +++ b/app/src/main/res/layout/pdf_person.xml @@ -1,26 +1,25 @@ - + android:orientation="vertical"> - + - + \ No newline at end of file