Added night mode
This commit is contained in:
10
app/app.iml
10
app/app.iml
@@ -99,33 +99,33 @@
|
||||
<orderEntry type="library" name="Gradle: androidx.preference:preference:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.google.android.material:material:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.recyclerview:recyclerview:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.constraintlayout:constraintlayout:2.0.0-beta2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.ms-square:expandableTextView:0.1.4@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.legacy:legacy-support-core-ui:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.constraintlayout:constraintlayout:2.0.0-beta2@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-base:17.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-tasks:17.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement:17.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.fragment:fragment:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat-resources:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.legacy:legacy-support-core-utils:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.transition:transition:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.viewpager:viewpager:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.drawerlayout:drawerlayout:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.slidingpanelayout:slidingpanelayout:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.customview:customview:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.asynclayoutinflater:asynclayoutinflater:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.appcompat:appcompat-resources:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.loader:loader:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.activity:activity:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable-animated:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.vectordrawable:vectordrawable:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.core:core:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.versionedparcelable:versionedparcelable:1.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.cardview:cardview:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.interpolator:interpolator:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.cursoradapter:cursoradapter:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.lifecycle:lifecycle-viewmodel:2.1.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.documentfile:documentfile:1.0.0@aar" level="project" />
|
||||
<orderEntry type="library" name="Gradle: androidx.localbroadcastmanager:localbroadcastmanager:1.0.0@aar" level="project" />
|
||||
|
||||
@@ -32,6 +32,7 @@ dependencies {
|
||||
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'com.android.volley:volley:1.1.1'
|
||||
implementation 'com.github.Cutta:TagView:1.3'
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.Locale;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.arch.core.util.Function;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
@@ -173,6 +174,13 @@ public class MainActivity extends AppCompatActivity
|
||||
toggle.syncState();
|
||||
}
|
||||
|
||||
String nightMode = Preferences.getStringArray(getApplicationContext(), R.array.pref_night_mode);
|
||||
switch (nightMode) {
|
||||
case "night": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); break;
|
||||
case "day": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); break;
|
||||
default: AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); break;
|
||||
}
|
||||
|
||||
mNavigationView = findViewById(R.id.nav_view);
|
||||
mNavigationView.setNavigationItemSelectedListener(this);
|
||||
mFragmentManager = getSupportFragmentManager();
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.ContentResolver;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
@@ -65,5 +66,12 @@ public class PrefsFragment extends PreferenceFragmentCompat implements SharedPre
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String nightMode = Preferences.getStringArray(requireContext(), R.array.pref_night_mode);
|
||||
switch (nightMode) {
|
||||
case "night": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); break;
|
||||
case "day": AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); break;
|
||||
default: AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class ModDetailAssignmentAdapter extends RecyclerView.Adapter<CustomViewHolder>
|
||||
String name = urlToName(notes.get(i), i, holder.mView.getResources());
|
||||
Tag tag = new Tag(name);
|
||||
tag.id = i;
|
||||
tag.layoutColor = ContextCompat.getColor(holder.mView.getContext(), R.color.colorFUBlue);
|
||||
tag.layoutColor = ContextCompat.getColor(holder.mView.getContext(), R.color.fuAccent);
|
||||
holder.mTagGroup.addTag(tag);
|
||||
}
|
||||
holder.mTagGroup.setOnTagClickListener((tag, i) -> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="@color/colorFUBlue" android:state_checked="true" />
|
||||
<item android:color="@color/colorFUBlack" android:state_checked="false"/>
|
||||
<item android:color="@color/fuAccent" android:state_checked="true" />
|
||||
<item android:color="@color/fuHeaderText1" android:state_checked="false"/>
|
||||
</selector>
|
||||
@@ -1,4 +1,4 @@
|
||||
<vector android:height="24dp" android:tint="@color/colorFUGreenDark"
|
||||
<vector android:height="24dp" android:tint="@color/fuAccent"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M13,7h-2v4L7,11v2h4v4h2v-4h4v-2h-4L13,7zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<vector android:height="24dp" android:tint="#003366"
|
||||
<vector android:height="24dp" android:tint="@color/fuAccent"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<vector android:height="24dp" android:tint="#003366"
|
||||
<vector android:height="24dp" android:tint="@color/fuAccent"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z"/>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<vector android:height="18dp" android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:viewportWidth="24.0" android:width="18dp" xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:tint="@color/fuIcon">
|
||||
<path android:fillColor="#FF000000" android:pathData="M8.59,16.34l4.58,-4.59 -4.58,-4.59L10,5.75l6,6 -6,6z"/>
|
||||
</vector>
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
android:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="@color/fuAccent">
|
||||
<path
|
||||
android:fillColor="#003366"
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
|
||||
</vector>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<vector android:height="24dp" android:tint="@color/colorFURed"
|
||||
<vector android:height="24dp" android:tint="@color/fuIconWarn"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13L7,13v-2h10v2z"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<vector android:height="24dp" android:tint="@color/colorFURed"
|
||||
<vector android:height="24dp" android:tint="@color/fuIconWarn"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M7,11v2h10v-2L7,11zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="4dp"
|
||||
android:color="@color/colorFUBlue" />
|
||||
android:color="@color/fuAccent" />
|
||||
|
||||
<solid
|
||||
android:color="@color/colorFUBlue"
|
||||
android:color="@color/fuAccent"
|
||||
/>
|
||||
|
||||
<corners android:radius="360dp" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:endColor="@color/colorFUGreenDark"
|
||||
android:startColor="@color/colorFUGreen"
|
||||
android:endColor="@color/fuSecondary"
|
||||
android:startColor="@color/fuPrimary"
|
||||
android:type="linear" />
|
||||
</shape>
|
||||
@@ -17,8 +17,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
app:itemTextColor="@color/menu_text_color"
|
||||
app:itemIconTint="@color/menu_text_color"
|
||||
app:itemTextColor="@color/fuHeaderText2"
|
||||
app:itemIconTint="@color/fuHeaderText2"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/error_textview"
|
||||
android:textAppearance="@style/TextAppearance.Design.Error"
|
||||
android:textColor="@color/colorFURed"
|
||||
android:textColor="@color/fuIconWarn"
|
||||
tools:text="@string/hello_blank_fragment" />
|
||||
|
||||
<!-- Email Label -->
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:itemTextColor="@color/menu_text_color"
|
||||
app:itemIconTint="@color/menu_text_color"
|
||||
app:itemTextColor="@color/fuHeaderText2"
|
||||
app:itemIconTint="@color/fuHeaderText2"
|
||||
app:headerLayout="@layout/nav_header_main"
|
||||
app:menu="@menu/activity_main_drawer" />
|
||||
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
android:theme="@style/FUTheme.AppBarOverlay">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorFUGreen"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
android:background="@color/fuToolbarBackground"
|
||||
app:popupTheme="@style/FUTheme.PopupOverlay" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/no_connection_msg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorFUOrange"
|
||||
android:textColor="@color/colorFUWhite"
|
||||
android:textColor="@color/colorFUBlack"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -7,32 +7,33 @@
|
||||
tools:context=".fragments.ScheduleFragment">
|
||||
|
||||
<de.sebse.fuplanner.tools.ui.weekview.WeekView
|
||||
android:background="@color/colorFUGrayDark"
|
||||
android:id="@+id/weekView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:eventTextColor="@color/colorFUWhite"
|
||||
app:textSize="12sp"
|
||||
app:hourHeight="30dp"
|
||||
app:headerColumnPadding="8dp"
|
||||
app:headerColumnTextColor="#8f000000"
|
||||
app:headerRowPadding="12dp"
|
||||
app:columnGap="8dp"
|
||||
app:noOfVisibleDays="5"
|
||||
app:headerRowBackgroundColor="@color/colorFUGrayDark"
|
||||
app:firstDayOfWeek="monday"
|
||||
app:showFirstDayOfWeekFirst="true"
|
||||
app:futureWeekendBackgroundColor="@color/colorFURedLight"
|
||||
app:pastWeekendBackgroundColor="@color/colorFURedLight2"
|
||||
app:futureBackgroundColor="@color/colorFUWhite"
|
||||
app:maxTime="21"
|
||||
app:minTime="7"
|
||||
app:showDistinctPastFutureColor="true"
|
||||
app:showDistinctWeekendColor="true"
|
||||
app:hourSeparatorColor="@android:color/black"
|
||||
app:showNowLine="true"
|
||||
app:defaultEventColor="@color/colorFUBlue"
|
||||
app:headerColumnBackground="@color/colorFUGrayDark"
|
||||
app:headerColumnTextColor="@color/fuHeaderText3"
|
||||
android:background="@color/fuBackgroundShadowed"
|
||||
app:eventTextColor="@color/colorFUWhite"
|
||||
app:headerRowBackgroundColor="@color/fuBackgroundShadowed"
|
||||
app:futureWeekendBackgroundColor="@color/fuWeekendFuture"
|
||||
app:pastWeekendBackgroundColor="@color/fuWeekendPast"
|
||||
app:futureBackgroundColor="@color/fuWeekFuture"
|
||||
app:pastBackgroundColor="@color/fuWeekPast"
|
||||
app:hourSeparatorColor="@color/fuHeaderText3"
|
||||
app:defaultEventColor="@color/fuAccent"
|
||||
app:headerColumnBackground="@color/fuBackgroundShadowed"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorFUGreen"
|
||||
android:background="@color/fuToolbarBackground"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="de.sebse.fuplanner.fragments.StartupFragment"
|
||||
tools:ignore="Overdraw">
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
style="@style/FUTheme.itemTitle"
|
||||
tools:text="Test this new stuff!" />
|
||||
|
||||
<TextView
|
||||
@@ -26,8 +25,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginTop="5dip"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
tools:text="Peter Bauer" />
|
||||
|
||||
<TextView
|
||||
@@ -36,8 +34,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/sub_left"
|
||||
android:layout_alignBottom="@id/sub_left"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="20.03.18 18:42 Uhr" />
|
||||
|
||||
@@ -47,8 +44,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/title"
|
||||
android:layout_alignBottom="@id/title"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="Room 105"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
style="@style/FUTheme.itemTitle"
|
||||
tools:text="Test this new stuff!" />
|
||||
|
||||
<TextView
|
||||
@@ -24,8 +23,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginTop="5dip"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
tools:text="Peter Bauer" />
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorFUBlue"
|
||||
android:textColor="@color/fuAccent"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
android:typeface="sans"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorFUWhite"
|
||||
android:background="@color/colorFURed"
|
||||
android:background="@color/fuIconWarn"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
style="@style/FUTheme.itemTitle"
|
||||
tools:text="Test this new stuff!" />
|
||||
|
||||
<TextView
|
||||
@@ -37,8 +36,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginTop="5dip"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
tools:text="Peter Bauer" />
|
||||
|
||||
<TextView
|
||||
@@ -47,8 +45,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/sub_left"
|
||||
android:layout_alignBottom="@id/sub_left"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="20.03.18 18:42 Uhr" />
|
||||
|
||||
@@ -58,8 +55,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/title"
|
||||
android:layout_alignBottom="@id/title"
|
||||
android:textColor="#343434"
|
||||
android:textSize="12sp"
|
||||
style="@style/FUTheme.itemValue"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="Room 105"
|
||||
tools:ignore="RelativeOverlap" />
|
||||
|
||||
@@ -18,24 +18,16 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:textSize="16sp"
|
||||
android:textSize="12sp"
|
||||
android:textIsSelectable="true"
|
||||
android:textColor="#666666" />
|
||||
<ImageButton
|
||||
android:id="@id/expand_collapse"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:padding="12dp"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:contentDescription="@string/description" />
|
||||
</com.ms.square.android.expandabletextview.ExpandableTextView>
|
||||
|
||||
<!--<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/text_margin"
|
||||
android:text="@string/lorem_ipsum_100"
|
||||
android:textAppearance="?attr/textAppearanceListItem" />-->
|
||||
</LinearLayout>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:layout_marginTop="5dip"
|
||||
android:textColor="#343434"
|
||||
android:textColor="@color/colorFUGrayDark3"
|
||||
android:textSize="12sp"
|
||||
tools:text="8"
|
||||
android:layout_toStartOf="@id/slash"
|
||||
@@ -33,7 +33,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/title"
|
||||
android:textColor="#343434"
|
||||
android:textColor="@color/colorFUGrayDark3"
|
||||
android:textSize="30sp"
|
||||
android:text="@string/grade_separator"
|
||||
android:layout_toStartOf="@id/grade_max"
|
||||
@@ -45,7 +45,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/slash"
|
||||
android:layout_alignBottom="@id/slash"
|
||||
android:textColor="#343434"
|
||||
android:textColor="@color/colorFUGrayDark3"
|
||||
android:textSize="12sp"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:text="10" />
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorFUBlue"
|
||||
android:textColor="@color/fuAccent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/guideline"
|
||||
@@ -34,7 +34,7 @@
|
||||
android:textStyle="bold"
|
||||
android:typeface="sans"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/colorFUBlue"
|
||||
android:textColor="@color/fuAccent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/guideline"
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- This is the specific part you asked to color -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -21,4 +21,10 @@
|
||||
<item>Zeige nur vegetarisches Essen</item>
|
||||
<item>Zeige nur veganes Essen</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_night_mode_entries">
|
||||
<item>Folge System-Einstellungen</item>
|
||||
<item>Immer Tag-Modus</item>
|
||||
<item>Immer Nacht-Modus</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -46,6 +46,9 @@
|
||||
<string name="pref_food_level_title">Vegetarisch/Vegan</string>
|
||||
<string name="pref_food_level_summary">Zeige nur vegetarisches oder veganes Essen</string>
|
||||
<string name="pref_food_level_dialog">Essensfilter</string>
|
||||
<string name="pref_night_mode_title">Nacht-Modus</string>
|
||||
<string name="pref_night_mode_summary">Einstellung zur Verwendung vom Nacht-Modus</string>
|
||||
<string name="pref_night_mode_dialog">Nacht-Modus</string>
|
||||
<string name="pref_sync_frequency_title">Synchronisationshäufigkeit</string>
|
||||
<string name="pref_sync_frequency_summary">Stellt Häufigkeit der automatischen Synchronisation ein</string>
|
||||
<string name="pref_sync_frequency_dialog">Sync-Frequenz</string>
|
||||
|
||||
23
app/src/main/res/values-night/colors.xml
Normal file
23
app/src/main/res/values-night/colors.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="fuPrimary">@color/colorFUGreenDark</color>
|
||||
<color name="fuSecondary">@color/colorFUGreenDark</color>
|
||||
<color name="fuAccent">@color/colorFUBlueLight</color>
|
||||
|
||||
<color name="fuBackground">@color/colorFUGrayDark3</color>
|
||||
<color name="fuBackgroundShadowed">@color/colorFUGrayDark2</color>
|
||||
<color name="fuBackgroundHighContrast">@color/colorFUBlack</color>
|
||||
<color name="fuToolbarBackground">@color/colorFUGreenDark</color>
|
||||
<color name="fuWeekendPast">@color/colorFURedDark</color>
|
||||
<color name="fuWeekendFuture">@color/colorFURedDark2</color>
|
||||
<color name="fuWeekPast">@color/colorFUBlack</color>
|
||||
<color name="fuWeekFuture">@color/colorFUGrayDark3</color>
|
||||
|
||||
<color name="fuHeaderText1">@color/colorFUWhite</color>
|
||||
<color name="fuHeaderText2">@color/colorFUGray</color>
|
||||
<color name="fuHeaderText3">@color/colorFUGrayDark</color>
|
||||
|
||||
<color name="fuIcon">@color/colorFUBlack</color>
|
||||
<color name="fuIconPrimary">@color/colorFUBlack</color>
|
||||
<color name="fuIconWarn">@color/colorFURed</color>
|
||||
</resources>
|
||||
@@ -40,4 +40,15 @@
|
||||
<item>vegetarian</item>
|
||||
<item>vegan</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_night_mode_entries">
|
||||
<item>Follow system default</item>
|
||||
<item>Always day mode</item>
|
||||
<item>Always night mode</item>
|
||||
</string-array>
|
||||
<string-array name="pref_night_mode_values" translatable="false">
|
||||
<item>auto</item>
|
||||
<item>day</item>
|
||||
<item>night</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
@@ -5,10 +5,37 @@
|
||||
<color name="colorFUWhite">#FDFDFD</color>
|
||||
<color name="colorFUGray">#e0e0e0</color>
|
||||
<color name="colorFUGrayDark">#cccccc</color>
|
||||
<color name="colorFUGrayDark2">#444444</color>
|
||||
<color name="colorFUGrayDark3">#343434</color>
|
||||
<color name="colorFUBlue">#003366</color>
|
||||
<color name="colorFUBlack">#333333</color>
|
||||
<color name="colorFUBlueLight">#587A9E</color>
|
||||
<color name="colorFUBlack">#222222</color>
|
||||
<color name="colorFURedLight">#f5cccc</color>
|
||||
<color name="colorFURedLight2">#cca3a3</color>
|
||||
<color name="colorFURedDark">#4d2b2b</color>
|
||||
<color name="colorFURedDark2">#402f2f</color>
|
||||
<color name="colorFURed">#CC0000</color>
|
||||
<color name="colorFUOrange">#FF9900</color>
|
||||
|
||||
<color name="fuPrimary">@color/colorFUGreen</color>
|
||||
<color name="fuSecondary">@color/colorFUGreenDark</color>
|
||||
<color name="fuAccent">@color/colorFUBlue</color>
|
||||
|
||||
<color name="fuBackground">@color/colorFUGray</color>
|
||||
<color name="fuBackgroundShadowed">@color/colorFUGrayDark</color>
|
||||
<color name="fuBackgroundHighContrast">@color/colorFUWhite</color>
|
||||
<color name="fuToolbarBackground">@color/colorFUGreen</color>
|
||||
<color name="fuWeekendPast">@color/colorFURedLight2</color>
|
||||
<color name="fuWeekendFuture">@color/colorFURedLight</color>
|
||||
<color name="fuWeekPast">@color/colorFUGray</color>
|
||||
<color name="fuWeekFuture">@color/colorFUWhite</color>
|
||||
|
||||
|
||||
<color name="fuHeaderText1">@color/colorFUBlack</color>
|
||||
<color name="fuHeaderText2">@color/colorFUGrayDark3</color>
|
||||
<color name="fuHeaderText3">@color/colorFUGrayDark3</color>
|
||||
|
||||
<color name="fuIcon">@color/colorFUBlack</color>
|
||||
<color name="fuIconPrimary">@color/colorFUBlack</color>
|
||||
<color name="fuIconWarn">@color/colorFURed</color>
|
||||
</resources>
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
<string name="pref_food_level" translatable="false">pref_food_level</string>
|
||||
<string name="pref_food_level_default" translatable="false">all</string>
|
||||
|
||||
<string-array name="pref_night_mode" translatable="false">
|
||||
<item>@string/pref_night_mode</item>
|
||||
<item>@string/pref_night_mode_default</item>
|
||||
</string-array>
|
||||
<string name="pref_night_mode" translatable="false">pref_night_mode</string>
|
||||
<string name="pref_night_mode_default" translatable="false">auto</string>
|
||||
|
||||
<!-- Other preferences -->
|
||||
|
||||
<string name="pref_last_visited_news" translatable="false">pref_last_visited_news</string>
|
||||
|
||||
@@ -53,9 +53,12 @@
|
||||
<string name="pref_food_level_title">Meal Filter</string>
|
||||
<string name="pref_food_level_summary">Only show vegetarian or vegan foods</string>
|
||||
<string name="pref_food_level_dialog">Meal Filter Selection</string>
|
||||
<string name="pref_night_mode_title">Night mode</string>
|
||||
<string name="pref_night_mode_summary">Set usage of night mode</string>
|
||||
<string name="pref_night_mode_dialog">Night Mode Selection</string>
|
||||
<string name="pref_sync_frequency_title">Sync frequency</string>
|
||||
<string name="pref_sync_frequency_summary">Set automatic background sync frequency</string>
|
||||
<string name="pref_sync_frequency_dialog">Frequency selection</string>
|
||||
<string name="pref_sync_frequency_dialog">Frequency Selection</string>
|
||||
<string name="meals">Meals</string>
|
||||
<string name="special_meals">Special meals</string>
|
||||
<string name="side_dishes">Side Dishes</string>
|
||||
|
||||
@@ -1,28 +1,27 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar" tools:keep="@style/AppTheme">
|
||||
|
||||
<style name="FUTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
|
||||
|
||||
>
|
||||
|
||||
<style name="FUTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.DayNight" />
|
||||
|
||||
<style name="FUTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">@color/fuPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/fuSecondary</item>
|
||||
<item name="colorAccent">@color/fuAccent</item>
|
||||
<item name="android:windowBackground">@color/fuBackground</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" tools:keep="@style/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" />
|
||||
|
||||
<style name="FUTheme" parent="Theme.AppCompat.Light.NoActionBar" />
|
||||
|
||||
<style name="FUTheme.itemTitle">
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textColor">@android:color/primary_text_light</item>
|
||||
<item name="android:textColor">@color/fuHeaderText2</item>
|
||||
</style>
|
||||
<style name="FUTheme.itemValue">
|
||||
<item name="android:textSize">12sp</item>
|
||||
<item name="android:textColor">#343434</item>
|
||||
<item name="android:textColor">@color/fuHeaderText3</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -17,6 +17,14 @@
|
||||
android:entries="@array/pref_food_level_entries"
|
||||
android:entryValues="@array/pref_food_level_values"
|
||||
android:dialogTitle="@string/pref_food_level_dialog" />
|
||||
<ListPreference
|
||||
android:key="@string/pref_night_mode"
|
||||
android:defaultValue="@string/pref_night_mode_default"
|
||||
android:title="@string/pref_night_mode_title"
|
||||
android:summary="@string/pref_night_mode_summary"
|
||||
android:entries="@array/pref_night_mode_entries"
|
||||
android:entryValues="@array/pref_night_mode_values"
|
||||
android:dialogTitle="@string/pref_night_mode_dialog" />
|
||||
<ListPreference
|
||||
android:key="@string/pref_sync_frequency"
|
||||
android:defaultValue="@string/pref_sync_frequency_default"
|
||||
|
||||
Reference in New Issue
Block a user