fix some lint warnings
continuous-integration/drone/push Build is passing Details

* remove unused resources
This commit is contained in:
Jannik 2020-08-10 14:51:40 +02:00
parent fb3dab6dc3
commit dd5c7b3fb8
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
8 changed files with 291 additions and 283 deletions

View File

@ -11,7 +11,7 @@ android {
minSdkVersion 23
targetSdkVersion 29
versionCode 15
versionName "0.5.90"
versionName "0.5.91"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "build_time", buildTime()
setProperty("archivesBaseName", "projectlaogai-$versionName")

View File

@ -29,8 +29,8 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.Switch
import android.widget.TextView
import androidx.appcompat.widget.SwitchCompat
import androidx.fragment.app.Fragment
import com.afollestad.aesthetic.Aesthetic
import com.afollestad.materialdialogs.MaterialDialog
@ -72,7 +72,7 @@ class SettingsFragment : Fragment() {
private lateinit var linLayoutTheme: LinearLayout
private lateinit var linLayoutPrimaryColor: LinearLayout
private lateinit var linLayoutAccentColor: LinearLayout
private lateinit var switchBuffet: Switch
private lateinit var switchBuffet: SwitchCompat
private lateinit var txtViewCourse: TextView
private var selectedTheme = DataTypes.Theme.Light

View File

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
</vector>

View File

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
</vector>

View File

@ -1,313 +1,345 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragments.SettingsFragment"
android:background="?themePrimary">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?themePrimary"
tools:context=".fragments.SettingsFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.cardview.widget.CardView
android:id="@+id/cardView_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<androidx.cardview.widget.CardView
android:layout_marginTop="9dp"
app:cardBackgroundColor="?themeSecondary"
app:cardElevation="5dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:id="@+id/cardView_Info"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
app:cardBackgroundColor="?themeSecondary">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:orientation="vertical">
<TextView
android:text="@string/info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_Info"
android:typeface="sans"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="sans-serif"
android:layout_margin="7dp"
android:textColor="?colorAccent"/>
android:id="@+id/txtView_Info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:fontFamily="sans-serif"
android:text="@string/info"
android:textColor="?colorAccent"
android:textSize="18sp"
android:textStyle="bold"
android:typeface="sans" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="7dp"
android:id="@+id/linLayout_User">
<TextView
android:text="@string/sample_user"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_User"
android:textSize="16sp"
android:textStyle="bold"
/>
<TextView
android:text="@string/user"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_UserDesc"/>
</LinearLayout>
<View
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:id="@+id/linLayout_Course">
<TextView
android:text="@string/sample_course"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_Course"
android:textSize="16sp"
android:textStyle="bold"/>
<TextView
android:text="@string/course_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_CourseDesc"/>
</LinearLayout>
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:id="@+id/linLayout_ManageLessons">
android:id="@+id/linLayout_User"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="7dp">
<TextView
android:id="@+id/txtView_ManageLessons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/manage_lessons"
android:textSize="16sp"
android:textStyle="bold" />
android:id="@+id/txtView_User"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sample_user"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_ManageLessonsDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/manage_lessons_desc" />
android:id="@+id/txtView_UserDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/user" />
</LinearLayout>
<View
android:id="@+id/divider7"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:orientation="vertical"
android:id="@+id/linLayout_Course"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_Course"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:id="@+id/linLayout_About">
android:layout_height="wrap_content"
android:text="@string/sample_course"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:text="@string/about_txtView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_About"
android:textStyle="bold"
android:textSize="16sp"
/>
<TextView
android:text="@string/about_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_AboutDesc"/>
android:id="@+id/txtView_CourseDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/course_desc" />
</LinearLayout>
<View
android:id="@+id/divider6"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/linLayout_Licence"
android:layout_margin="7dp">
android:id="@+id/linLayout_ManageLessons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:orientation="vertical">
<TextView
android:text="@string/licenses"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/textView3"
android:textStyle="bold" android:textSize="16sp"/>
android:id="@+id/txtView_ManageLessons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/manage_lessons"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_ManageLessonsDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/manage_lessons_desc" />
</LinearLayout>
<View
android:id="@+id/divider7"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:id="@+id/linLayout_About"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_About"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_txtView"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_AboutDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_version" />
</LinearLayout>
<View
android:id="@+id/divider6"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:id="@+id/linLayout_Licence"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:orientation="vertical">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/licenses"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/cardView_Settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?themeSecondary"
app:cardElevation="5dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:id="@+id/linLayout_Settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cardView_Settings"
app:cardElevation="5dp"
app:cardUseCompatPadding="true"
app:cardBackgroundColor="?themeSecondary">
<LinearLayout
android:orientation="vertical"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_Settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linLayout_Settings"
>
<TextView
android:text="@string/settings"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_Settings"
android:typeface="sans"
android:textSize="18sp"
android:textColor="?colorAccent"
android:textStyle="bold"
android:paddingTop="3dp" android:layout_margin="7dp"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" android:id="@+id/linLayout_Theme"
android:layout_margin="7dp">
<TextView
android:text="@string/theme"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/txtView_Theme"
android:textSize="16sp" android:textStyle="bold"/>
<TextView
android:text="@string/themeLight"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/txtView_SelectedTheme"/>
</LinearLayout>
<View
android:id="@+id/divider3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
android:layout_margin="7dp"
android:paddingTop="3dp"
android:text="@string/settings"
android:textColor="?colorAccent"
android:textSize="18sp"
android:textStyle="bold"
android:typeface="sans" />
<LinearLayout
android:id="@+id/linLayout_PrimaryColor"
android:id="@+id/linLayout_Theme"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="7dp"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_Theme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/theme"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_SelectedTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/themeLight" />
</LinearLayout>
<View
android:id="@+id/divider3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:id="@+id/linLayout_PrimaryColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical|end"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_PrimaryColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/primary_color"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_PrimaryColorDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/primary_color_desc" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical|end"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/txtView_PrimaryColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/primary_color"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_PrimaryColorDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/primary_color_desc" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:gravity="end"
android:orientation="vertical">
android:gravity="end"
android:orientation="vertical">
<View
android:id="@+id/view_PrimaryColor"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="?colorPrimary" />
android:id="@+id/view_PrimaryColor"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="?colorPrimary" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divider4"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
android:id="@+id/divider4"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:id="@+id/linLayout_AccentColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:clickable="true"
android:focusable="true"
android:gravity="center_vertical|end"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical|end"
android:clickable="true"
android:id="@+id/linLayout_AccentColor"
android:focusable="true" android:layout_margin="7dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
android:orientation="vertical">
<TextView
android:text="@string/accent_color"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_AccentColor"
android:textSize="16sp"
android:textStyle="bold"
/>
<TextView
android:text="@string/accent_color_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/txtView_AccentColorDesc"/>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/txtView_AccentColor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:gravity="end">
<View
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/view_AccentColor"
android:background="?colorAccent"/>
android:text="@string/accent_color"
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtView_AccentColorDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/accent_color_desc" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divider5"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
/>
<Switch
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/switch_buffet"
android:textSize="16sp"
android:textStyle="bold"
android:text="@string/show_buffet"
android:layout_margin="7dp"/>
android:layout_margin="7dp"
android:gravity="end"
android:orientation="vertical">
<View
android:id="@+id/view_AccentColor"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="?colorAccent" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divider5"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switch_buffet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="7dp"
android:text="@string/show_buffet"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>

View File

@ -63,7 +63,6 @@
<string name="delete">löschen</string>
<string name="cancel">abbrechen</string>
<string name="select">auswählen</string>
<string name="close">schließen</string>
<string name="mensa_credit">Mensa-Guthaben</string>
<string name="mensa_current">aktuell: %1$s\n</string>
<string name="mensa_last">letzte Abbuchung: %1$s</string>

View File

@ -68,7 +68,6 @@
<string name="delete">delete</string>
<string name="cancel">@android:string/cancel</string>
<string name="select">select</string>
<string name="close">close</string>
<string name="mensa_credit">Mensa credit</string>
<string name="mensa_current">current: %1$s\n</string>
<string name="mensa_last">last: %1$s</string>

View File

@ -47,10 +47,6 @@
<item name="md_color_content">@color/textPrimaryDark</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>