next weeks menu & accent color

* the MensaParser can now get the next weeks menus
* it's now possible to select a accent color
This commit is contained in:
2019-03-09 22:15:53 +01:00
parent 5a1a07cd42
commit 3e3a80442e
14 changed files with 188 additions and 89 deletions

View File

@ -21,6 +21,7 @@
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:itemTextColor="?colorAccent"
app:menu="@menu/activity_main_drawer"/>
</androidx.drawerlayout.widget.DrawerLayout>

View File

@ -30,7 +30,7 @@
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="@color/colorPrimary"/>
android:layout_margin="7dp" android:textColor="?colorAccent"/>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
@ -100,20 +100,20 @@
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/linLayout_Settings">
android:layout_height="wrap_content" android:id="@+id/linLayout_Settings" android:padding="7dp">
<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="@color/design_default_color_primary"
android:textStyle="bold" android:layout_margin="7dp" android:paddingTop="3dp"/>
android:textSize="18sp" android:textColor="?colorAccent"
android:textStyle="bold" android:paddingTop="3dp"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_margin="7dp"
android:layout_height="wrap_content"
android:gravity="center_vertical|end"
android:clickable="true" android:id="@+id/linLayout_MainColor" android:focusable="true">
android:clickable="true" android:id="@+id/linLayout_PrimaryColor" android:focusable="true">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
@ -125,7 +125,7 @@
android:textSize="16sp" android:textStyle="bold"
android:textColor="@android:color/primary_text_light"/>
<TextView
android:text="@string/main_color_desc"
android:text="@string/primary_color_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/txtView_PrimaryColorDesc"/>
</LinearLayout>
@ -140,6 +140,44 @@
android:background="?colorPrimary"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical|end"
android:clickable="true" android:id="@+id/linLayout_AccentColor" android:focusable="true">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<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"
android:textColor="@android:color/primary_text_light"/>
<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: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"/>
</LinearLayout>
</LinearLayout>
<Switch
android:layout_width="match_parent"
android:layout_height="wrap_content" android:id="@+id/switch_buffet"
android:textSize="16sp"
android:textColor="@android:color/primary_text_light" android:textStyle="bold"
android:text="@string/show_buffet"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>

View File

@ -4,7 +4,10 @@
tools:showIn="navigation_view">
<group android:checkableBehavior="single">
<item android:id="@+id/nav_home" android:title="@string/home" android:icon="@drawable/ic_baseline_home_24dp"/>
<item
android:id="@+id/nav_home"
android:title="@string/home"
android:icon="@drawable/ic_baseline_home_24dp"/>
<item
android:id="@+id/nav_mensa"
android:icon="@drawable/ic_local_dining_black_24dp"

View File

@ -19,11 +19,14 @@
<string name="info">Info</string>
<string name="user">Benutzer</string>
<string name="course_desc">Tippen, um den Kurs zu ändern</string>
<string name="primary_color">Primärfarbe</string>
<string name="main_color_desc">Die Primärfarbe, standard ist Schwarz</string>
<string name="primary_color">Hauptfarbe</string>
<string name="primary_color_desc">Die Primärfarbe, Standard ist Schwarz.</string>
<string name="accent_color">Akzentfarbe</string>
<string name="accent_color_desc">Die Akzentfarbe, Standard ist indigo</string>
<string name="select">auswählen</string>
<string name="about">über</string>
<string name="loading_timetable">lade Stundenplan …</string>
<string name="navigation_drawer_close">Navigationsleiste schließen</string>
<string name="navigation_drawer_open">Navigationsleiste öffnen</string>
<string name="show_buffet">Buffet immer anzeigen</string>
</resources>

View File

@ -2,7 +2,7 @@
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorAccent">#d81b60</color>
<color name="colorAccent">#3F51B5</color>
<color name="colorMensaDay">#ebe8e9</color>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@ -35,21 +35,22 @@
<string name="user">User</string>
<string name="course_desc">Tap to change course</string>
<string name="primary_color">primary color</string>
<string name="main_color_desc">The primary color, default is black</string>
<string name="primary_color_desc">The primary color, default is black.</string>
<string name="accent_color">accent color</string>
<string name="accent_color_desc">The accent color, default is indigo.</string>
<string name="show_buffet">always show buffet</string>
<string name="select">select</string>
<string name="version" translatable="false">version 0.3.3</string>
<string name="about">about</string>
<string name="about_txtView" translatable="false">hso App by @Seil0</string>
<string name="about_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="about_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="string_new_line" translatable="false">%1$s\n</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>
<string name="save_key_colorPrimary" translatable="false">org.mosad.seil0.projectlaogai.colorPrimary</string>
<string name="save_key_colorAccent" translatable="false">org.mosad.seil0.projectlaogai.colorAccent</string>
</resources>