Browse Source

change primary color to reflect mosad.xyz design guidelines

* minor style fix: nav_header_main set background to black and text color to white
pull/46/head
Jannik 2 years ago
parent
commit
3e2ef0521e
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 6
      app/src/main/java/org/mosad/seil0/projectlaogai/controller/PreferencesController.kt
  2. 2
      app/src/main/res/drawable/background_splash.xml
  3. 9
      app/src/main/res/drawable/side_nav_bar.xml
  4. 30
      app/src/main/res/layouts/activities/layout/nav_header_main.xml
  5. 2
      app/src/main/res/values-de-rDE/strings.xml
  6. 8
      app/src/main/res/values/colors.xml
  7. 2
      app/src/main/res/values/strings.xml

6
app/src/main/java/org/mosad/seil0/projectlaogai/controller/PreferencesController.kt

@ -37,7 +37,7 @@ class PreferencesController {
var coursesCacheTime: Long = 0
var mensaCacheTime: Long = 0
var timetableCacheTime: Long = 0
var cColorPrimary: Int = Color.BLACK
var cColorPrimary: Int = Color.parseColor("#009688")
var cColorAccent: Int = Color.parseColor("#3F51B5")
var cCourse = Course("https://www.hs-offenburg.de/index.php?id=6627&class=class&iddV=DA64F6FE-9DDB-429E-A677-05D0D40CB636&week=0", "AI3")
var cShowBuffet = true
@ -168,10 +168,10 @@ class PreferencesController {
// load saved colors
cColorPrimary = sharedPref.getInt(context.getString(
R.string.save_key_colorPrimary
), Color.BLACK)
), cColorPrimary)
cColorAccent = sharedPref.getInt(context.getString(
R.string.save_key_colorAccent
), Color.parseColor("#3F51B5"))
), cColorAccent)
// load showBuffet
cShowBuffet = sharedPref.getBoolean(context.getString(

2
app/src/main/res/drawable/background_splash.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/colorPrimary"/>
<item android:drawable="@android:color/black"/>
<item android:gravity="center" android:width="144dp" android:height="144dp">
<bitmap

9
app/src/main/res/drawable/side_nav_bar.xml

@ -1,9 +0,0 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="?colorPrimary"
android:endColor="?colorPrimaryDark"
android:startColor="?colorPrimary"
android:type="linear"/>
</shape>

30
app/src/main/res/layouts/activities/layout/nav_header_main.xml

@ -1,38 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_header_main"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@color/colorPrimary"
android:paddingBottom="@dimen/activity_vertical_margin"
android:background="@android:color/black"
android:gravity="bottom"
android:orientation="vertical"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
android:orientation="vertical"
android:gravity="bottom"
android:id="@+id/nav_header_main">
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_laogai_icon"
android:contentDescription="@string/app_name"
android:id="@+id/imageView"/>
android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_laogai_icon" />
<TextView
android:id="@+id/txtView_nav_header_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/nav_header_title"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:id="@+id/txtView_nav_header_title"/>
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="#FFFFFF" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nav_header_subtitle"
android:id="@+id/textView"/>
android:textColor="#ffffff" />
</LinearLayout>

2
app/src/main/res/values-de-rDE/strings.xml

@ -51,7 +51,7 @@
<string name="themeDark">Dunkel</string>
<string name="themeBlack">Schwarz</string>
<string name="primary_color">Primärfarbe</string>
<string name="primary_color_desc">Zum Ändern tippen, Standard ist Schwarz.</string>
<string name="primary_color_desc">Zum Ändern tippen, Standard ist Blaugrün.</string>
<string name="accent_color">Akzentfarbe</string>
<string name="accent_color_desc">Zum Ändern tippen, Standard ist Indigo.</string>
<string name="show_buffet">Buffet immer anzeigen</string>

8
app/src/main/res/values/colors.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#000000</color>
<color name="colorPrimaryDark">#000000</color>
<color name="colorPrimary">#009688</color>
<color name="colorPrimaryDark">#009688</color>
<color name="colorAccent">#3f51b5</color>
<color name="ic_launcher_background">#ffffff</color>
@ -9,10 +9,10 @@
<color name="themePrimaryDark">#000000</color>
<color name="themeSecondaryDark">#303030</color>
<color name="textPrimaryDark">#ffffff</color>
<color name="textSecondaryDark">#e0e0e0</color>
<color name="textSecondaryDark">#c0c0c0</color>
<color name="dividerDark">#232323</color>
<color name="themePrimaryLight">#ffffff</color>
<color name="themePrimaryLight">#f5f5f5</color>
<color name="themeSecondaryLight">#ffffff</color>
<color name="textPrimaryLight">#000000</color>
<color name="textSecondaryLight">#818181</color>

2
app/src/main/res/values/strings.xml

@ -56,7 +56,7 @@
<string name="themeDark">Dark</string>
<string name="themeBlack">Black</string>
<string name="primary_color">Primary color</string>
<string name="primary_color_desc">Tap to change, default is black.</string>
<string name="primary_color_desc">Tap to change, default is teal blue.</string>
<string name="accent_color">Accent color</string>
<string name="accent_color_desc">Tap to change, default is indigo.</string>
<string name="show_buffet">Always show buffet</string>

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close