update to kotlin 1.3.40, added theme choose option

* added missing dividers in settings
* added a black theme
* closes #15
This commit is contained in:
2019-06-25 12:07:18 +02:00
parent a055f59cc8
commit 98b3adbf3b
12 changed files with 106 additions and 35 deletions

View File

@ -2,8 +2,10 @@
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content" app:cardUseCompatPadding="true"
app:cardElevation="5dp" app:cardBackgroundColor="?themeSecondary"
android:layout_height="wrap_content"
app:cardUseCompatPadding="true"
app:cardElevation="5dp"
app:cardBackgroundColor="?themeSecondary"
>
<LinearLayout

View File

@ -66,7 +66,7 @@
android:id="@+id/divider2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:background="?dividerColor"
/>
<LinearLayout
android:orientation="vertical"
@ -91,7 +91,7 @@
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
android:background="?dividerColor"
/>
<LinearLayout
android:orientation="vertical"
@ -128,7 +128,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/linLayout_Settings"
android:padding="7dp">
>
<TextView
android:text="@string/settings"
android:layout_width="match_parent"
@ -138,7 +138,28 @@
android:textSize="18sp"
android:textColor="?colorAccent"
android:textStyle="bold"
android:paddingTop="3dp"/>
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"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
@ -146,7 +167,7 @@
android:gravity="center_vertical|end"
android:clickable="true"
android:id="@+id/linLayout_PrimaryColor"
android:focusable="true">
android:focusable="true" android:layout_margin="7dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
@ -178,6 +199,12 @@
android:background="?colorPrimary"/>
</LinearLayout>
</LinearLayout>
<View
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"
@ -185,7 +212,7 @@
android:gravity="center_vertical|end"
android:clickable="true"
android:id="@+id/linLayout_AccentColor"
android:focusable="true">
android:focusable="true" android:layout_margin="7dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
@ -217,6 +244,12 @@
android:background="?colorAccent"/>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/divider5"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/listDivider"
/>
<Switch
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -224,7 +257,7 @@
android:textSize="16sp"
android:textStyle="bold"
android:text="@string/show_buffet"
/>
android:layout_margin="7dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>

View File

@ -30,6 +30,6 @@
android:id="@+id/divider_lesson"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor"
/>
android:background="?dividerColor"/>
</LinearLayout>

View File

@ -27,4 +27,8 @@
<string name="navigation_drawer_open">Navigationsleiste öffnen</string>
<string name="show_buffet">Buffet immer anzeigen</string>
<string name="select_course">Wähle deinen Studiengang aus</string>
<string name="theme">Design</string>
<string name="themeLight">Hell</string>
<string name="themeDark">Dunkel</string>
<string name="themeBlack">Schwarz</string>
</resources>

View File

@ -42,6 +42,10 @@
<string name="about_dialog_heading">About</string>
<string name="about_dialog_text" translatable="false">"This software is made by @Seil0 and is published under the terms and conditions of GPL 3. For further information visit \ngit.mosad.xyz/Seil0/ProjectLaogai \n\n© 2018-2019 seil0@mosad.xyz "</string>
<string name="loading_timetable">loading timetable …</string>
<string name="theme">Theme</string>
<string name="themeLight">light</string>
<string name="themeDark">dark</string>
<string name="themeBlack">black</string>
<string name="save_key_course" translatable="false">org.mosad.seil0.projectlaogai.course</string>
<string name="save_key_courseTTLink" translatable="false">org.mosad.seil0.projectlaogai.courseTTLink</string>

View File

@ -25,6 +25,15 @@
<item name="dividerColor">@color/dividerDark</item>
</style>
<style name="AppTheme.Black" parent="AppTheme">
<item name="themeName">black</item>
<item name="themePrimary">@color/themePrimaryDark</item>
<item name="themeSecondary">@color/themePrimaryDark</item>
<item name="android:textColor">@color/textPrimaryDark</item>
<item name="textPrimary">@color/textPrimaryDark</item>
<item name="dividerColor">@color/dividerDark</item>
</style>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>