Version 1.3.0 (little design overhaul) with additional fixes

This commit is contained in:
Deniz Düzgören
2019-05-09 07:48:17 +02:00
parent 4c3d011c6f
commit 907a746b55
35 changed files with 392 additions and 1167 deletions
+2 -9
View File
@@ -3,21 +3,13 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
android { android {
// signingConfigs {
// release {
// keyAlias 'key0'
// keyPassword 'Cinemassacre'
// storeFile file('C:/Users/kduez/git/substKey.jks')
// storePassword 'Cinemassacre'
// }
// }
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
applicationId "com.denizd.substitutionplan" applicationId "com.denizd.substitutionplan"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 11 versionCode 11
versionName "1.2.6" versionName "1.3.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {
@@ -41,6 +33,7 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04' implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
implementation 'com.google.android.material:material:1.1.0-alpha05' implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'com.android.support:customtabs:28.0.0' implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.jaredrummler:android-device-names:1.1.8' implementation 'com.jaredrummler:android-device-names:1.1.8'
implementation 'com.github.mukeshsolanki:easypreferences:1.0.6' implementation 'com.github.mukeshsolanki:easypreferences:1.0.6'
Binary file not shown.
+2 -1
View File
@@ -25,7 +25,8 @@
android:name=".MainActivity" android:name=".MainActivity"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppThemeLight.Launcher"> android:theme="@style/AppThemeLight.Launcher"
android:windowSoftInputMode="adjustPan">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@@ -198,9 +198,9 @@ public class CardAdapter extends RecyclerView.Adapter<CardAdapter.CardViewHolder
} finally { } finally {
if (colour == 0) { if (colour == 0) {
if (prefs.getInt("themeInt", 0) == 1) { if (prefs.getInt("themeInt", 0) == 1) {
colour = R.color.lightgrey; colour = R.color.textLight;
} else { } else {
colour = R.color.lessdark; colour = R.color.textDark;
} }
} }
holder.mImageView.getDrawable().setTint(ContextCompat.getColor(holder.mImageView.getContext(), colour)); holder.mImageView.getDrawable().setTint(ContextCompat.getColor(holder.mImageView.getContext(), colour));
@@ -0,0 +1,79 @@
package com.denizd.substitutionplan;
public class DataGetter {
protected static int getIcon(String course) {
if (course.toLowerCase().contains("deu") || course.toLowerCase().contains("dep") || course.toLowerCase().contains("daz")) {
return R.drawable.ic_german;
} else if (course.toLowerCase().contains("mat") || course.toLowerCase().contains("map")) {
return R.drawable.ic_maths;
} else if (course.toLowerCase().contains("eng") || course.toLowerCase().contains("enp") || course.toLowerCase().contains("ena")) {
return R.drawable.ic_english;
} else if (course.toLowerCase().contains("spo") || course.toLowerCase().contains("spp") || course.toLowerCase().contains("spth")) {
return R.drawable.ic_pe;
} else if (course.toLowerCase().contains("pol") || course.toLowerCase().contains("pop")) {
return R.drawable.ic_politics;
} else if (course.toLowerCase().contains("dar") || course.toLowerCase().contains("dap")) {
return R.drawable.ic_drama;
} else if (course.toLowerCase().contains("phy") || course.toLowerCase().contains("php")) {
return R.drawable.ic_physics;
} else if (course.toLowerCase().contains("bio") || course.toLowerCase().contains("bip") || course.toLowerCase().contains("nw")) {
return R.drawable.ic_biology;
} else if (course.toLowerCase().contains("che") || course.toLowerCase().contains("chp")) {
return R.drawable.ic_chemistry;
} else if (course.toLowerCase().contains("phi") || course.toLowerCase().contains("psp")) {
return R.drawable.ic_philosophy;
} else if (course.toLowerCase().contains("laa") || course.toLowerCase().contains("laf") || course.toLowerCase().contains("lat")) {
return R.drawable.ic_latin;
} else if (course.toLowerCase().contains("spa") || course.toLowerCase().contains("spf")) {
return R.drawable.ic_spanish;
} else if (course.toLowerCase().contains("fra") || course.toLowerCase().contains("frf") || course.toLowerCase().contains("frz")) {
return R.drawable.ic_french;
} else if (course.toLowerCase().contains("inf")) {
return R.drawable.ic_compsci;
} else if (course.toLowerCase().contains("ges")) {
return R.drawable.ic_history;
} else if (course.toLowerCase().contains("rel")) {
return R.drawable.ic_religion;
} else if (course.toLowerCase().contains("geg") || course.toLowerCase().contains("wuk")) {
return R.drawable.ic_geography;
} else if (course.toLowerCase().contains("kun")) {
return R.drawable.ic_arts;
} else if (course.toLowerCase().contains("mus")) {
return R.drawable.ic_music;
} else if (course.toLowerCase().contains("tue")) {
return R.drawable.ic_turkish;
} else if (course.toLowerCase().contains("chi")) {
return R.drawable.ic_chinese;
} else if (course.toLowerCase().contains("gll")) {
return R.drawable.ic_gll;
} else if (course.toLowerCase().contains("wat")) {
return R.drawable.ic_wat;
} else if (course.toLowerCase().contains("för")) {
return R.drawable.ic_help;
} else if (course.toLowerCase().contains("wp") || course.toLowerCase().contains("met")) {
return R.drawable.ic_pencil;
} else {
return R.drawable.ic_empty;
}
}
protected static String[] boy = {"Cedric Grislawski", "Dawid Kniola", "Jonas Köstergarten", "Jakob Moerschner", "Siamak Nemati", "Hendrik Plönnings",
"Jan Rohmann", "Anton Rosenberger", "Christoph Senft", "Jan Mika Sieckendieck", "Alexander Sinaj",
"Nico Tischer", "Nhat Vinh Tran", "Leon Becker", "Youssef Beltagi", "Erich Kerkesner", "Alex Lick",
"Oskar Piskorz", "Theo Recktor", "Eray Vatansever", "Dennis Wojciechowski", "Übeydullah Alkan",
"Yahya Almarashli", "Sinan Aydin", "Rick Büteröwe", "Levin Dropp", "Silvester Jermolajew", "Tolgay Kekilli",
"Dennis Lange", "Aras Mahmoud", "Batuhan Özcan", "Michael Rek", "Khabat Sharif", "Anbinh Tran",
"Bastian Westerboer", "Abdulwahab Alshebli", "Kelechi Gaius", "Armin Großmann", "Anes Halep",
"Marco Jankowski", "Emirhan Kaplan", "Alexander Kofmann", "Tobi Derek Köhler", "Vasilije Nedeljkovic",
"Batu Öcal", "Paul Rehbohm"};
protected static String[] girl = {"Mayra Dronia", "Shalin Ramadan", "Nigina Amin", "Mariya Kheder", "Niegen Khosrawi", "Dayana Osipova",
"Julia Petri", "Laura Pister", "Dana Alyoussef", "Ilkem Kahramanoglu", "Rozita Amiri", "Mirja Arneke",
"Nastasja Banik", "Anni Kienke", "Benedite Mateta", "Leonie Pohl", "Cecillia Sawires", "Patrycja Smółka",
"Elif Zencirkiran", "Nusyba Al Semadi", "Vivien Bruns", "Yasemin Dal", "Svenja Demuth", "Nina Groß",
"Kim Lahmeyer", "Luca Minschke", "Kim Reschke", "Amélie Schnellecke", "Delal Secer", "Xenia Segijanski",
"Melisa Tas", "Kim Völker", "Banu Yari", "Zeinab Ali", "Mariam Bannout", "Stefanie Fahl", "Yamaty Gaye",
"Anna-Sophia Haeberle", "Finja Hastedt", "Viktoria Hammermeister", "Isabel Horn", "Laura Kern",
"Melanie Kleinermann", "Målin Kollhoff", "Darja Maier", "Lisa Maier", "Naura Nadzifah", "Janina Roelfs",
"Vanessa Scheifler", "Mara Thies", "Lieli Umar", "Leonie Welk", "Betraben Yacoub"};
}
@@ -6,7 +6,6 @@ import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Resources;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.graphics.drawable.Animatable; import android.graphics.drawable.Animatable;
@@ -14,13 +13,11 @@ import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import androidx.annotation.ColorInt;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewAnimationUtils; import android.view.ViewAnimationUtils;
@@ -36,14 +33,11 @@ import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton; import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
import com.jaredrummler.android.device.DeviceName;
import java.util.Calendar; import java.util.Calendar;
public class FirstTime extends AppCompatActivity { public class FirstTime extends AppCompatActivity {
private String manufacturer;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@@ -85,32 +79,6 @@ public class FirstTime extends AppCompatActivity {
final ImageButton helpClasses = findViewById(R.id.chipHelpClasses); final ImageButton helpClasses = findViewById(R.id.chipHelpClasses);
final ImageButton helpCourses = findViewById(R.id.chipHelpCourses); final ImageButton helpCourses = findViewById(R.id.chipHelpCourses);
// TODO Huawei
// DeviceName.with(context).request(new DeviceName.Callback() {
// @Override
// public void onFinished(DeviceName.DeviceInfo info, Exception error) {
// manufacturer = info.manufacturer;
// if (manufacturer.contains("Huawei") ||
// manufacturer.contains("Honor")) {
//// if (true) {
// notif.setEnabled(false);
//
// @ColorInt int color;
//
// TypedValue typedValue = new TypedValue();
// Resources.Theme theme = context.getTheme();
// theme.resolveAttribute(R.attr.colorHint, typedValue, true);
// color = typedValue.data;
//
// notif.setTextColor(color);
// edit.putBoolean("notif", false);
// edit.putBoolean("autoRefresh", true);
// edit.apply();
// }
// }
// });
helpCourses.setOnClickListener(new View.OnClickListener() { helpCourses.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@@ -1,8 +1,5 @@
package com.denizd.substitutionplan; package com.denizd.substitutionplan;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
public class Food { public class Food {
private String food; private String food;
@@ -3,7 +3,6 @@ package com.denizd.substitutionplan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import java.util.ArrayList; import java.util.ArrayList;
@@ -3,9 +3,7 @@ package com.denizd.substitutionplan
import android.content.SharedPreferences import android.content.SharedPreferences
import android.os.Bundle import android.os.Bundle
import android.preference.PreferenceManager import android.preference.PreferenceManager
import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@@ -22,19 +22,15 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView;
import org.jsoup.Jsoup; import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.google.android.material.snackbar.Snackbar.make; import static com.google.android.material.snackbar.Snackbar.make;
public class FragmentFood extends Fragment { public class FragmentFood extends Fragment {
@@ -55,9 +51,6 @@ public class FragmentFood extends Fragment {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood); final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood);
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
final SharedPreferences.Editor edit = prefs.edit();
final LayoutAnimationController animationIn = AnimationUtils.loadLayoutAnimation(getActivity(), R.anim.layout_animation_fall_down);
final LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(LAYOUT_INFLATER_SERVICE);
EasyPrefrences easyPrefs = new EasyPrefrences(getContext()); EasyPrefrences easyPrefs = new EasyPrefrences(getContext());
ArrayList<String> foodListPopulation = new ArrayList<>(easyPrefs.getListString("foodListPrefs")); ArrayList<String> foodListPopulation = new ArrayList<>(easyPrefs.getListString("foodListPrefs"));
@@ -70,12 +63,6 @@ public class FragmentFood extends Fragment {
mAdapter = new FoodAdapter(foodArrayList); mAdapter = new FoodAdapter(foodArrayList);
recyclerView.setAdapter(mAdapter); recyclerView.setAdapter(mAdapter);
// try {
// recyclerView.removeAllViews();
// } catch (NullPointerException e) {
//
// }
for (int i = 0; i < foodListPopulation.size(); i++) { for (int i = 0; i < foodListPopulation.size(); i++) {
foodArrayList.add(new Food(foodListPopulation.get(i))); foodArrayList.add(new Food(foodListPopulation.get(i)));
mAdapter.setFood(foodArrayList); mAdapter.setFood(foodArrayList);
@@ -104,8 +91,6 @@ public class FragmentFood extends Fragment {
boolean attempt = false, npe = false; boolean attempt = false, npe = false;
Elements foodElements; Elements foodElements;
Document docFood; Document docFood;
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
final SharedPreferences.Editor edit = prefs.edit();
final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood); final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood);
protected fetcher() { protected fetcher() {
@@ -122,7 +107,6 @@ public class FragmentFood extends Fragment {
progressBar.setProgress(0); progressBar.setProgress(0);
progressBar.setMax(foodElements.size()); progressBar.setMax(foodElements.size());
// progressBar.incrementProgressBy(paragraphs[0].size());
} catch (IOException e1) { } catch (IOException e1) {
npe = true; npe = true;
} catch (NullPointerException e1) { } catch (NullPointerException e1) {
@@ -197,9 +181,6 @@ public class FragmentFood extends Fragment {
ArrayList<String> foodListPopulation = new ArrayList<>(easyPrefs.getListString("foodListPrefs")); ArrayList<String> foodListPopulation = new ArrayList<>(easyPrefs.getListString("foodListPrefs"));
final LayoutAnimationController animationIn = AnimationUtils.loadLayoutAnimation(getActivity(), R.anim.layout_animation_fall_down);
final LayoutInflater inflater = (LayoutInflater) getActivity().getSystemService(LAYOUT_INFLATER_SERVICE);
for (int i = 0; i < foodListPopulation.size(); i++) { for (int i = 0; i < foodListPopulation.size(); i++) {
foodArrayList.add(new Food(foodListPopulation.get(i))); foodArrayList.add(new Food(foodListPopulation.get(i)));
mAdapter.setFood(foodArrayList); mAdapter.setFood(foodArrayList);
@@ -240,7 +221,6 @@ public class FragmentFood extends Fragment {
} }
} catch (NullPointerException e) { } catch (NullPointerException e) {
// pullToRefresh.setRefreshing(false);
} }
} else if (npe) { } else if (npe) {
pullToRefresh.setRefreshing(false); pullToRefresh.setRefreshing(false);
@@ -1,6 +1,5 @@
package com.denizd.substitutionplan; package com.denizd.substitutionplan;
import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
@@ -11,6 +10,7 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.madapps.prefrences.EasyPrefrences;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
@@ -43,7 +43,6 @@ import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
import static com.google.android.material.snackbar.Snackbar.make; import static com.google.android.material.snackbar.Snackbar.make;
public class FragmentPersonal extends Fragment { public class FragmentPersonal extends Fragment {
@@ -55,6 +54,7 @@ public class FragmentPersonal extends Fragment {
private TextView bottomSheetText; private TextView bottomSheetText;
private SubstViewModel substViewModel; private SubstViewModel substViewModel;
private boolean persPlanEmpty; private boolean persPlanEmpty;
private EasyPrefrences easyPrefs;
@Nullable @Nullable
@Override @Override
@@ -69,6 +69,7 @@ public class FragmentPersonal extends Fragment {
bottomSheetText = getView().getRootView().findViewById(R.id.bottom_sheet_text); bottomSheetText = getView().getRootView().findViewById(R.id.bottom_sheet_text);
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity()); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
final SharedPreferences.Editor edit = prefs.edit(); final SharedPreferences.Editor edit = prefs.edit();
easyPrefs = new EasyPrefrences(getContext());
bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo))); bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo)));
@@ -144,6 +145,7 @@ public class FragmentPersonal extends Fragment {
recyclerView.scheduleLayoutAnimation(); recyclerView.scheduleLayoutAnimation();
mAdapter.setSubst(planCardList); mAdapter.setSubst(planCardList);
bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo))); bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo)));
Handler handler = new Handler(); Handler handler = new Handler();
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
@Override @Override
@@ -163,9 +165,6 @@ public class FragmentPersonal extends Fragment {
} }
}); });
// pullToRefresh.setRefreshing(true);
// new fetcher().execute();
pullToRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { pullToRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override @Override
public void onRefresh() { public void onRefresh() {
@@ -180,9 +179,9 @@ public class FragmentPersonal extends Fragment {
private int count = 0, pCount = 0, priority = 200; private int count = 0, pCount = 0, priority = 200;
final String OLD_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz", NEW_FORMAT = "yyyy-MM-dd, HH:mm:ss"; final String OLD_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz", NEW_FORMAT = "yyyy-MM-dd, HH:mm:ss";
String newDateString, informational; String newDateString;
String[] groupS, dateS, timeS, courseS, roomS, additionalS; String[] groupS, dateS, timeS, courseS, roomS, additionalS;
boolean attempt = false, npe = false, emptyIcon; boolean attempt = false, npe = false;
URL url; URL url;
URLConnection connection; URLConnection connection;
String modified; String modified;
@@ -194,6 +193,7 @@ public class FragmentPersonal extends Fragment {
ProgressBar progressBar; ProgressBar progressBar;
SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT); SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);
Date d; Date d;
private ArrayList<String> informationalList = new ArrayList<>();
protected fetcher() { protected fetcher() {
} }
@@ -214,16 +214,6 @@ public class FragmentPersonal extends Fragment {
pCount = paragraphs.size(); pCount = paragraphs.size();
attempt = true; attempt = true;
for (int i = 0; i < pCount; i++) {
if (i == 0) {
informational = paragraphs.get(i).text();
} else {
informational += "\n\n" + paragraphs.get(i).text();
}
}
edit.putString("informational", informational);
edit.apply();
groupS = new String[count]; groupS = new String[count];
dateS = new String[count]; dateS = new String[count];
timeS = new String[count]; timeS = new String[count];
@@ -249,13 +239,23 @@ public class FragmentPersonal extends Fragment {
additionalS[i] = cols.get(5).text(); additionalS[i] = cols.get(5).text();
progressBar.incrementProgressBy(1); progressBar.incrementProgressBy(1);
int drawable = icons(courseS[i]); int drawable = DataGetter.getIcon(courseS[i]);
Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority); Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority);
substViewModel.insert(subst); substViewModel.insert(subst);
priority--; priority--;
} }
} }
for (int i = 0; i < pCount; i++) {
if (i == 0) {
informationalList.add(paragraphs.get(i).text());
} else {
informationalList.add("\n\n" + paragraphs.get(i).text());
}
}
easyPrefs.putListString("informationalList", informationalList);
} catch (IOException e1) { } catch (IOException e1) {
npe = true; npe = true;
} catch (NullPointerException e1) { } catch (NullPointerException e1) {
@@ -265,67 +265,8 @@ public class FragmentPersonal extends Fragment {
return null; return null;
} }
private int icons(String course) {
emptyIcon = false;
if (course.toLowerCase().contains("deu") || course.toLowerCase().contains("dep") || course.toLowerCase().contains("daz")) {
return R.drawable.ic_german;
} else if (course.toLowerCase().contains("mat") || course.toLowerCase().contains("map")) {
return R.drawable.ic_maths;
} else if (course.toLowerCase().contains("eng") || course.toLowerCase().contains("enp") || course.toLowerCase().contains("ena")) {
return R.drawable.ic_english;
} else if (course.toLowerCase().contains("spo") || course.toLowerCase().contains("spp") || course.toLowerCase().contains("spth")) {
return R.drawable.ic_pe;
} else if (course.toLowerCase().contains("pol") || course.toLowerCase().contains("pop")) {
return R.drawable.ic_politics;
} else if (course.toLowerCase().contains("dar") || course.toLowerCase().contains("dap")) {
return R.drawable.ic_drama;
} else if (course.toLowerCase().contains("phy") || course.toLowerCase().contains("php")) {
return R.drawable.ic_physics;
} else if (course.toLowerCase().contains("bio") || course.toLowerCase().contains("bip") || course.toLowerCase().contains("nw")) {
return R.drawable.ic_biology;
} else if (course.toLowerCase().contains("che") || course.toLowerCase().contains("chp")) {
return R.drawable.ic_chemistry;
} else if (course.toLowerCase().contains("phi") || course.toLowerCase().contains("psp")) {
return R.drawable.ic_philosophy;
} else if (course.toLowerCase().contains("laa") || course.toLowerCase().contains("laf") || course.toLowerCase().contains("lat")) {
return R.drawable.ic_latin;
} else if (course.toLowerCase().contains("spa") || course.toLowerCase().contains("spf")) {
return R.drawable.ic_spanish;
} else if (course.toLowerCase().contains("fra") || course.toLowerCase().contains("frf") || course.toLowerCase().contains("frz")) {
return R.drawable.ic_french;
} else if (course.toLowerCase().contains("inf")) {
return R.drawable.ic_compsci;
} else if (course.toLowerCase().contains("ges")) {
return R.drawable.ic_history;
} else if (course.toLowerCase().contains("rel")) {
return R.drawable.ic_religion;
} else if (course.toLowerCase().contains("geg") || course.toLowerCase().contains("wuk")) {
return R.drawable.ic_geography;
} else if (course.toLowerCase().contains("kun")) {
return R.drawable.ic_arts;
} else if (course.toLowerCase().contains("mus")) {
return R.drawable.ic_music;
} else if (course.toLowerCase().contains("tue")) {
return R.drawable.ic_turkish;
} else if (course.toLowerCase().contains("chi")) {
return R.drawable.ic_chinese;
} else if (course.toLowerCase().contains("gll")) {
return R.drawable.ic_gll;
} else if (course.toLowerCase().contains("wat")) {
return R.drawable.ic_wat;
} else if (course.toLowerCase().contains("för")) {
return R.drawable.ic_help;
} else if (course.toLowerCase().contains("wp") || course.toLowerCase().contains("met")) {
return R.drawable.ic_pencil;
} else {
emptyIcon = true;
return R.drawable.ic_empty;
}
}
@Override @Override
protected void onPostExecute(Void result) { protected void onPostExecute(Void result) {
try {
if (attempt) { if (attempt) {
final Animation fadeOut = AnimationUtils.loadAnimation(getContext(), R.anim.fade_out); final Animation fadeOut = AnimationUtils.loadAnimation(getContext(), R.anim.fade_out);
@@ -367,9 +308,6 @@ public class FragmentPersonal extends Fragment {
.setAction("Action", null); .setAction("Action", null);
snackbar.show(); snackbar.show();
} }
} catch (NullPointerException e) {
}
} }
@@ -23,7 +23,6 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
@@ -93,17 +92,7 @@ public class FragmentPlan extends Fragment {
substViewModel.getAllSubst().observe(this, new Observer<List<Subst>>() { substViewModel.getAllSubst().observe(this, new Observer<List<Subst>>() {
@Override @Override
public void onChanged(List<Subst> substs) { public void onChanged(List<Subst> substs) {
// LayoutAnimationController animationOut = AnimationUtils.loadLayoutAnimation(getContext(), R.anim.layout_animation_fall_down_out);
// LayoutAnimationController animationIn = AnimationUtils.loadLayoutAnimation(getContext(), R.anim.layout_animation_fall_down);
// recyclerView.setLayoutAnimation(animationOut);
// recyclerView.scheduleLayoutAnimation();
mAdapter.setSubst(substs); mAdapter.setSubst(substs);
for (int i = 0; i < mAdapter.getItemCount(); i++) {
}
// recyclerView.setLayoutAnimation(animationIn);
recyclerView.scheduleLayoutAnimation(); recyclerView.scheduleLayoutAnimation();
bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo))); bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo)));
} }
@@ -126,7 +115,7 @@ public class FragmentPlan extends Fragment {
final String OLD_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz", NEW_FORMAT = "yyyy-MM-dd, HH:mm:ss"; final String OLD_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz", NEW_FORMAT = "yyyy-MM-dd, HH:mm:ss";
String newDateString, informational; String newDateString, informational;
String[] groupS, dateS, timeS, courseS, roomS, additionalS; String[] groupS, dateS, timeS, courseS, roomS, additionalS;
boolean attempt = false, npe = false, emptyIcon; boolean attempt = false, npe = false;
URL url; URL url;
URLConnection connection; URLConnection connection;
String modified; String modified;
@@ -193,7 +182,7 @@ public class FragmentPlan extends Fragment {
additionalS[i] = cols.get(5).text(); additionalS[i] = cols.get(5).text();
progressBar.incrementProgressBy(1); progressBar.incrementProgressBy(1);
int drawable = icons(courseS[i]); int drawable = DataGetter.getIcon(courseS[i]);
Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority); Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority);
substViewModel.insert(subst); substViewModel.insert(subst);
priority--; priority--;
@@ -209,64 +198,6 @@ public class FragmentPlan extends Fragment {
return null; return null;
} }
private int icons(String course) {
emptyIcon = false;
if (course.toLowerCase().contains("deu") || course.toLowerCase().contains("dep") || course.toLowerCase().contains("daz")) {
return R.drawable.ic_german;
} else if (course.toLowerCase().contains("mat") || course.toLowerCase().contains("map")) {
return R.drawable.ic_maths;
} else if (course.toLowerCase().contains("eng") || course.toLowerCase().contains("enp") || course.toLowerCase().contains("ena")) {
return R.drawable.ic_english;
} else if (course.toLowerCase().contains("spo") || course.toLowerCase().contains("spp") || course.toLowerCase().contains("spth")) {
return R.drawable.ic_pe;
} else if (course.toLowerCase().contains("pol") || course.toLowerCase().contains("pop")) {
return R.drawable.ic_politics;
} else if (course.toLowerCase().contains("dar") || course.toLowerCase().contains("dap")) {
return R.drawable.ic_drama;
} else if (course.toLowerCase().contains("phy") || course.toLowerCase().contains("php")) {
return R.drawable.ic_physics;
} else if (course.toLowerCase().contains("bio") || course.toLowerCase().contains("bip") || course.toLowerCase().contains("nw")) {
return R.drawable.ic_biology;
} else if (course.toLowerCase().contains("che") || course.toLowerCase().contains("chp")) {
return R.drawable.ic_chemistry;
} else if (course.toLowerCase().contains("phi") || course.toLowerCase().contains("psp")) {
return R.drawable.ic_philosophy;
} else if (course.toLowerCase().contains("laa") || course.toLowerCase().contains("laf") || course.toLowerCase().contains("lat")) {
return R.drawable.ic_latin;
} else if (course.toLowerCase().contains("spa") || course.toLowerCase().contains("spf")) {
return R.drawable.ic_spanish;
} else if (course.toLowerCase().contains("fra") || course.toLowerCase().contains("frf") || course.toLowerCase().contains("frz")) {
return R.drawable.ic_french;
} else if (course.toLowerCase().contains("inf")) {
return R.drawable.ic_compsci;
} else if (course.toLowerCase().contains("ges")) {
return R.drawable.ic_history;
} else if (course.toLowerCase().contains("rel")) {
return R.drawable.ic_religion;
} else if (course.toLowerCase().contains("geg") || course.toLowerCase().contains("wuk")) {
return R.drawable.ic_geography;
} else if (course.toLowerCase().contains("kun")) {
return R.drawable.ic_arts;
} else if (course.toLowerCase().contains("mus")) {
return R.drawable.ic_music;
} else if (course.toLowerCase().contains("tue")) {
return R.drawable.ic_turkish;
} else if (course.toLowerCase().contains("chi")) {
return R.drawable.ic_chinese;
} else if (course.toLowerCase().contains("gll")) {
return R.drawable.ic_gll;
} else if (course.toLowerCase().contains("wat")) {
return R.drawable.ic_wat;
} else if (course.toLowerCase().contains("för")) {
return R.drawable.ic_help;
} else if (course.toLowerCase().contains("wp") || course.toLowerCase().contains("met")) {
return R.drawable.ic_pencil;
} else {
emptyIcon = true;
return R.drawable.ic_empty;
}
}
@Override @Override
protected void onPostExecute(Void result) { protected void onPostExecute(Void result) {
try { try {
@@ -1,16 +1,11 @@
package com.denizd.substitutionplan; package com.denizd.substitutionplan;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.material.snackbar.Snackbar;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProviders; import androidx.lifecycle.ViewModelProviders;
@@ -22,23 +17,12 @@ import android.text.TextWatcher;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static com.google.android.material.snackbar.Snackbar.make;
public class FragmentSearch extends Fragment { public class FragmentSearch extends Fragment {
ConstraintLayout constraintLayout; ConstraintLayout constraintLayout;
@@ -119,12 +103,6 @@ public class FragmentSearch extends Fragment {
if (substs.get(i).getGroup().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) { if (substs.get(i).getGroup().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
search = true; search = true;
} }
if (substs.get(i).getDate().toLowerCase().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
search = true;
}
if (substs.get(i).getTime().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
search = true;
}
if (substs.get(i).getCourse().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) { if (substs.get(i).getCourse().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
search = true; search = true;
} }
@@ -140,179 +118,7 @@ public class FragmentSearch extends Fragment {
search = false; search = false;
} }
} }
recyclerView.scheduleLayoutAnimation();
} }
} }
// private class fetcher extends AsyncTask<Void, Void, Void> {
//
// private int count = 0, iconColour;
// String[] groupS, dateS, timeS, courseS, roomS, additionalS;
// boolean attempt = false, search = false, first = false, npe = false, emptyIcon;
// Elements rows;
// Document doc;
// final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
// private RecyclerView recyclerView;
// private CardAdapter mAdapter;
// private RecyclerView.LayoutManager layoutManager;
// private ArrayList<Subst> planCardList;
//
// protected fetcher() {}
//
// @Override
// protected Void doInBackground(Void... params) {
//
// if (!first) {
// try {
// doc = Jsoup.connect("https://djd4rkn355.github.io/subst").get();
// rows = doc.select("tr");
// count = rows.size();
// attempt = true;
//
// } catch (IOException e1) {
// npe = true;
// }
//
// groupS = new String[count];
// dateS = new String[count];
// timeS = new String[count];
// courseS = new String[count];
// roomS = new String[count];
// additionalS = new String[count];
//
// if (attempt) {
// for (int i = 0; i < count; i++) {
// Element row = rows.get(i);
// Elements cols = row.select("th");
// groupS[i] = cols.get(0).text();
// dateS[i] = cols.get(1).text();
// timeS[i] = cols.get(2).text();
// courseS[i] = cols.get(3).text();
// roomS[i] = cols.get(4).text();
// additionalS[i] = cols.get(5).text();
// }
// }
//
// if (prefs.getInt("themeInt", 0) == 0) {
// iconColour = Color.parseColor("#212121");
// }
// if (prefs.getInt("themeInt", 0) == 1) {
// iconColour = Color.parseColor("#e0e0e0");
// }
// first = true;
// }
//
// return null;
// }
//
// private int icons(String[] courseS, int i) {
// emptyIcon = false;
// if (courseS[i].toLowerCase().contains("deu") || courseS[i].toLowerCase().contains("dep") || courseS[i].toLowerCase().contains("daz")) {
// return R.drawable.ic_german;
// } else if (courseS[i].toLowerCase().contains("mat") || courseS[i].toLowerCase().contains("map")) {
// return R.drawable.ic_maths;
// } else if (courseS[i].toLowerCase().contains("eng") || courseS[i].toLowerCase().contains("enp") || courseS[i].toLowerCase().contains("ena")) {
// return R.drawable.ic_english;
// } else if (courseS[i].toLowerCase().contains("spo") || courseS[i].toLowerCase().contains("spp") || courseS[i].toLowerCase().contains("spth")) {
// return R.drawable.ic_pe;
// } else if (courseS[i].toLowerCase().contains("pol") || courseS[i].toLowerCase().contains("pop")) {
// return R.drawable.ic_politics;
// } else if (courseS[i].toLowerCase().contains("dar") || courseS[i].toLowerCase().contains("dap")) {
// return R.drawable.ic_drama;
// } else if (courseS[i].toLowerCase().contains("phy") || courseS[i].toLowerCase().contains("php")) {
// return R.drawable.ic_physics;
// } else if (courseS[i].toLowerCase().contains("bio") || courseS[i].toLowerCase().contains("bip") || courseS[i].toLowerCase().contains("nw")) {
// return R.drawable.ic_biology;
// } else if (courseS[i].toLowerCase().contains("che") || courseS[i].toLowerCase().contains("chp")) {
// return R.drawable.ic_chemistry;
// } else if (courseS[i].toLowerCase().contains("phi") || courseS[i].toLowerCase().contains("psp")) {
// return R.drawable.ic_philosophy;
// } else if (courseS[i].toLowerCase().contains("laa") || courseS[i].toLowerCase().contains("laf") || courseS[i].toLowerCase().contains("lat")) {
// return R.drawable.ic_latin;
// } else if (courseS[i].toLowerCase().contains("spa") || courseS[i].toLowerCase().contains("spf")) {
// return R.drawable.ic_spanish;
// } else if (courseS[i].toLowerCase().contains("fra") || courseS[i].toLowerCase().contains("frf") || courseS[i].toLowerCase().contains("frz")) {
// return R.drawable.ic_french;
// } else if (courseS[i].toLowerCase().contains("inf")) {
// return R.drawable.ic_compsci;
// } else if (courseS[i].toLowerCase().contains("ges")) {
// return R.drawable.ic_history;
// } else if (courseS[i].toLowerCase().contains("rel")) {
// return R.drawable.ic_religion;
// } else if (courseS[i].toLowerCase().contains("geg") || courseS[i].toLowerCase().contains("wuk")) {
// return R.drawable.ic_geography;
// } else if (courseS[i].toLowerCase().contains("kun")) {
// return R.drawable.ic_arts;
// } else if (courseS[i].toLowerCase().contains("mus")) {
// return R.drawable.ic_music;
// } else if (courseS[i].toLowerCase().contains("tue")) {
// return R.drawable.ic_turkish;
// } else if (courseS[i].toLowerCase().contains("chi")) {
// return R.drawable.ic_chinese;
// } else if (courseS[i].toLowerCase().contains("gll")) {
// return R.drawable.ic_gll;
// } else if (courseS[i].toLowerCase().contains("wat")) {
// return R.drawable.ic_wat;
// } else if (courseS[i].toLowerCase().contains("för")) {
// return R.drawable.ic_help;
// } else if (courseS[i].toLowerCase().contains("wp") || courseS[i].toLowerCase().contains("met")) {
// return R.drawable.ic_pencil;
// } else {
// emptyIcon = true;
// return R.drawable.ic_empty;
// }
// }
//
// @Override
// protected void onPostExecute(Void result) {
// if (attempt) {
//
// try {
//
// planCardList = new ArrayList<>();
// recyclerView = getView().findViewById(R.id.linearRecyclerSearch);
// layoutManager = new LinearLayoutManager(getContext());
// recyclerView.setHasFixedSize(true);
// recyclerView.setLayoutManager(layoutManager);
// mAdapter = new CardAdapter(planCardList);
// recyclerView.setAdapter(mAdapter);
// } catch (NullPointerException e) {
// return;
// }
// recyclerView.removeAllViews();
// EditText searchfield = getView().findViewById(R.id.searchbar);
// final Animation animationIn = AnimationUtils.loadAnimation(getActivity(), R.anim.fade_in);
//
// for (int i = 0; i < count; i++) {
// if (groupS[i].toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// } if (dateS[i].toLowerCase().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// } if (timeS[i].toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// } if (courseS[i].toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// } if (roomS[i].toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// } if (additionalS[i].toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
// search = true;
// }
//
// if (search) {
// Drawable drawable = getResources().getDrawable(icons(courseS, i));
// if (!emptyIcon) {
// drawable.setTint(iconColour);
// }
// planCardList.add(new Subst(0, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], 0));
// recyclerView.setAnimation(animationIn);
// search = false;
// }
// }
// } else if (npe) {
// View contextView = getView().getRootView().findViewById(R.id.coordination);
// Snackbar snackbar = make(contextView, getText(R.string.nointernet), Snackbar.LENGTH_LONG)
// .setAction("Action", null);
// snackbar.show();
// }
// }
// }
} }
@@ -2,16 +2,13 @@ package com.denizd.substitutionplan;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.ActivityNotFoundException; import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.Uri; import android.net.Uri;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabsIntent; import androidx.browser.customtabs.CustomTabsIntent;
@@ -21,7 +18,6 @@ import androidx.fragment.app.Fragment;
import android.text.Editable; import android.text.Editable;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@@ -38,17 +34,16 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.android.material.button.MaterialButton; import com.google.android.material.button.MaterialButton;
import com.google.android.material.textfield.TextInputEditText;
import com.jaredrummler.android.device.DeviceName; import com.jaredrummler.android.device.DeviceName;
import org.w3c.dom.Text;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Random; import java.util.Random;
public class FragmentSettings extends Fragment implements View.OnClickListener { public class FragmentSettings extends Fragment implements View.OnClickListener {
CoordinatorLayout coordinatorLayout; CoordinatorLayout coordinatorLayout;
private int cs = 7, i = 0; private int cs = 7, i = 0;
private String manufacturer, name, model; private String name, model;
@Nullable @Nullable
@Override @Override
@@ -75,14 +70,14 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
builder.setToolbarColor(getResources().getColor(R.color.white)); builder.setToolbarColor(getResources().getColor(R.color.white));
final CustomTabsIntent customTabsIntent = builder.build(); final CustomTabsIntent customTabsIntent = builder.build();
final EditText txtName = getView().findViewById(R.id.txtName); final TextInputEditText txtName = getView().findViewById(R.id.txtName);
final Switch greeting = getView().findViewById(R.id.switchDisableGreeting); final Switch greeting = getView().findViewById(R.id.switchDisableGreeting);
final Switch darkmode = getView().findViewById(R.id.switchDark); final Switch darkmode = getView().findViewById(R.id.switchDark);
final Switch showinfo = getView().findViewById(R.id.switchHideInfo); final Switch showinfo = getView().findViewById(R.id.switchHideInfo);
final LinearLayout customiseColours = getView().findViewById(R.id.btnCustomiseColours); final LinearLayout customiseColours = getView().findViewById(R.id.btnCustomiseColours);
final EditText txtClasses = getView().findViewById(R.id.txtClasses); final TextInputEditText txtClasses = getView().findViewById(R.id.txtClasses);
final EditText txtCourses = getView().findViewById(R.id.txtCourses); final TextInputEditText txtCourses = getView().findViewById(R.id.txtCourses);
final ImageButton helpClasses = getView().findViewById(R.id.chipHelpClasses); final ImageButton helpClasses = getView().findViewById(R.id.chipHelpClasses);
final ImageButton helpCourses = getView().findViewById(R.id.chipHelpCourses); final ImageButton helpCourses = getView().findViewById(R.id.chipHelpCourses);
@@ -99,11 +94,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
final LinearLayout privacy = getView().findViewById(R.id.btnPrivacyP); final LinearLayout privacy = getView().findViewById(R.id.btnPrivacyP);
final LinearLayout version = getView().findViewById(R.id.btnVersion); final LinearLayout version = getView().findViewById(R.id.btnVersion);
final TextView notif1 = getView().findViewById(R.id.txtNotifications);
final TextView auto1 = getView().findViewById(R.id.txtAutoRefresh);
final TextView notif2 = getView().findViewById(R.id.txtNotifiedAbout);
final TextView auto2 = getView().findViewById(R.id.txtAutoRefreshTwo);
helpCourses.setOnClickListener(new View.OnClickListener() { helpCourses.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@@ -246,7 +236,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
} else { } else {
colourCustomiserBuilder = new AlertDialog.Builder(getContext(), R.style.AlertDialogCustomLight); colourCustomiserBuilder = new AlertDialog.Builder(getContext(), R.style.AlertDialogCustomLight);
} }
// colourCustomiserBuilder.setTitle(getString(R.string.customisecolor1));
View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.empty_dialog, null); View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.empty_dialog, null);
TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle); TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle);
titleText.setText(R.string.customisecolor1); titleText.setText(R.string.customisecolor1);
@@ -276,7 +265,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
} else { } else {
colourPickerBuilder = new AlertDialog.Builder(getContext(), R.style.AlertDialogCustomLight); colourPickerBuilder = new AlertDialog.Builder(getContext(), R.style.AlertDialogCustomLight);
} }
// colourPickerBuilder.setTitle(title);
View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.empty_dialog, null); View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.empty_dialog, null);
TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle); TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle);
titleText.setText(title); titleText.setText(title);
@@ -336,7 +324,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
colourCustomiserDialog.cancel(); colourCustomiserDialog.cancel();
} }
}); });
// alertDialog.setPositiveButton(R.string.finish, null);
colourCustomiserDialog.show(); colourCustomiserDialog.show();
} }
}); });
@@ -456,46 +443,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
} }
}); });
// TODO check whether Huawei devices actually support background services
// DeviceName.with(getContext()).request(new DeviceName.Callback() {
// @Override
// public void onFinished(DeviceName.DeviceInfo info, Exception error) {
// manufacturer = info.manufacturer;
// if (manufacturer.contains("Huawei") ||
// manufacturer.contains("Honor")) {
//// if (true) {
// notifswitch.setChecked(false);
// autoRefresh.setChecked(true);
// notifswitch.setEnabled(false);
// autoRefresh.setEnabled(false);
//
// @ColorInt int color;
// if (prefs.getInt("themeInt", 0) == 1) {
// TypedValue typedValue = new TypedValue();
// Resources.Theme theme = getContext().getTheme();
// theme.resolveAttribute(R.attr.colorHintDark, typedValue, true);
// color = typedValue.data;
// notif2.setTextColor(color);
// auto2.setTextColor(color);
// } else {
// TypedValue typedValue = new TypedValue();
// Resources.Theme theme = getContext().getTheme();
// theme.resolveAttribute(R.attr.colorHint, typedValue, true);
// color = typedValue.data;
// }
//
// notif1.setTextColor(color);
// auto1.setTextColor(color);
// edit.putBoolean("notif", false);
// edit.putBoolean("autoRefresh", true);
// edit.apply();
// notif2.setText(R.string.chinaNotif);
// auto2.setText(R.string.chinaAuto);
// }
// }
// });
website.setOnClickListener(new View.OnClickListener() { website.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@@ -519,12 +466,12 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
} }
View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.simple_dialog, null); View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.simple_dialog, null);
TextView title = dialogView.findViewById(R.id.textviewtitle); TextView title = dialogView.findViewById(R.id.textviewtitle);
title.setText("Licenses"); title.setText("Licences");
TextView dialogText = dialogView.findViewById(R.id.dialogtext); TextView dialogText = dialogView.findViewById(R.id.dialogtext);
dialogText.setText("Libraries:\n • Android Device Names © 2015 Jared Rummler, licensed under the Apache License, Version 2.0" + dialogText.setText("Libraries:\n • Android Device Names © 2015 Jared Rummler, licensed under the Apache Licence, Version 2.0" +
"\n • EasyPreferences © 2018 Mukesh Solanki, licensed under the MIT License" + "\n • EasyPreferences © 2018 Mukesh Solanki, licensed under the MIT Licence" +
"\n • jsoup HTML parser © 2009-2018 Jonathan Hedley, licensed under the open source MIT License" + "\n • jsoup HTML parser © 2009-2018 Jonathan Hedley, licensed under the open source MIT Licence" +
"\n\nFont:\n • Manrope © 2018-2019 Michael Sharanda, licensed under the SIL Open Font License 1.1" + "\n\nFont:\n • Manrope © 2018-2019 Michael Sharanda, licensed under the SIL Open Font Licence 1.1" +
"\n\nIcons:\n • bqlqn\n • fjstudio\n • Freepik\n • Smashicons\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0" + "\n\nIcons:\n • bqlqn\n • fjstudio\n • Freepik\n • Smashicons\n • © 2013-2019 Freepik Company S.L., licensed under Creative Commons BY 3.0" +
"\n\nMarketing & Publishing:\n • Leon Becker\n • Alex Lick\n • Batuhan Özcan\n • Erich Kerkesner"); "\n\nMarketing & Publishing:\n • Leon Becker\n • Alex Lick\n • Batuhan Özcan\n • Erich Kerkesner");
alertDialog.setView(dialogView); alertDialog.setView(dialogView);
@@ -758,8 +705,8 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
title.setText(R.string.dating); title.setText(R.string.dating);
Button datingBtn = dialogView.findViewById(R.id.dating_btn); Button datingBtn = dialogView.findViewById(R.id.dating_btn);
final EditText boyT = dialogView.findViewById(R.id.dating_txt1); final TextInputEditText boyT = dialogView.findViewById(R.id.dating_txt1);
final EditText girlT = dialogView.findViewById(R.id.dating_txt2); final TextInputEditText girlT = dialogView.findViewById(R.id.dating_txt2);
final CheckBox boy = dialogView.findViewById(R.id.cb1); final CheckBox boy = dialogView.findViewById(R.id.cb1);
final CheckBox girl = dialogView.findViewById(R.id.cb2); final CheckBox girl = dialogView.findViewById(R.id.cb2);
final TextView percentage = dialogView.findViewById(R.id.dating_txtp); final TextView percentage = dialogView.findViewById(R.id.dating_txtp);
@@ -769,10 +716,10 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
try { try {
double boyP = 0, girlP = 0, perc = 0; double boyP = 0, girlP = 0, perc = 0;
if (boyT.getText().toString().isEmpty() || boy.isChecked()) { if (boyT.getText().toString().isEmpty() || boy.isChecked()) {
boyT.setText(names.boy[gen.nextInt(names.boy.length)]); boyT.setText(DataGetter.boy[gen.nextInt(DataGetter.boy.length)]);
} }
if (girlT.getText().toString().isEmpty() || girl.isChecked()) { if (girlT.getText().toString().isEmpty() || girl.isChecked()) {
girlT.setText(names.girl[gen.nextInt(names.girl.length)]); girlT.setText(DataGetter.girl[gen.nextInt(DataGetter.girl.length)]);
} }
for (int i = 0; i < boyT.getText().length(); i++) { for (int i = 0; i < boyT.getText().length(); i++) {
boyP++; boyP++;
@@ -43,6 +43,7 @@ import android.view.Window;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@@ -57,7 +58,6 @@ public class MainActivity extends AppCompatActivity {
BottomSheetBehavior bottomSheetBehaviour; BottomSheetBehavior bottomSheetBehaviour;
private String manufacturer; private String manufacturer;
private String marketName;
protected void job() { protected void job() {
ComponentName componentName = new ComponentName(this, ScheduledJobService.class); ComponentName componentName = new ComponentName(this, ScheduledJobService.class);
@@ -77,7 +77,6 @@ public class MainActivity extends AppCompatActivity {
final SharedPreferences.Editor edit = prefs.edit(); final SharedPreferences.Editor edit = prefs.edit();
final Intent firstTime = new Intent(this, FirstTime.class); final Intent firstTime = new Intent(this, FirstTime.class);
if (prefs.getBoolean("firstTime", true)) { if (prefs.getBoolean("firstTime", true)) {
// if (true) {
startActivity(firstTime); startActivity(firstTime);
finish(); finish();
} }
@@ -104,9 +103,6 @@ public class MainActivity extends AppCompatActivity {
Window window = this.getWindow(); Window window = this.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
// window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
final BottomNavigationView bottomNav = findViewById(R.id.bottom_nav); final BottomNavigationView bottomNav = findViewById(R.id.bottom_nav);
final Chip chip = findViewById(R.id.chip); final Chip chip = findViewById(R.id.chip);
@@ -160,19 +156,14 @@ public class MainActivity extends AppCompatActivity {
} }
} }
// TODO Huawei dialog
if (prefs.getBoolean("huaweiDeviceDialog", true)) { if (prefs.getBoolean("huaweiDeviceDialog", true)) {
// if (true) {
DeviceName.with(this).request(new DeviceName.Callback() { DeviceName.with(this).request(new DeviceName.Callback() {
@Override @Override
public void onFinished(DeviceName.DeviceInfo info, Exception error) { public void onFinished(DeviceName.DeviceInfo info, Exception error) {
manufacturer = info.manufacturer; manufacturer = info.manufacturer;
marketName = info.marketName;
if (manufacturer.contains("Huawei") || if (manufacturer.contains("Huawei") ||
manufacturer.contains("Honor") || manufacturer.contains("Honor") ||
manufacturer.contains("Xiaomi")) { manufacturer.contains("Xiaomi")) {
// if (true) {
AlertDialog.Builder alertDialog; AlertDialog.Builder alertDialog;
View dialogView = LayoutInflater.from(context).inflate(R.layout.secret_dialog, null); View dialogView = LayoutInflater.from(context).inflate(R.layout.secret_dialog, null);
@@ -185,15 +176,6 @@ public class MainActivity extends AppCompatActivity {
} }
TextView dialogText = dialogView.findViewById(R.id.dialogtext); TextView dialogText = dialogView.findViewById(R.id.dialogtext);
dialogText.setText(R.string.chinaDialog); dialogText.setText(R.string.chinaDialog);
// Button searchbtn = dialogView.findViewById(R.id.searchbtn);
// searchbtn.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
// intent.putExtra(SearchManager.QUERY, marketName + " disable power optimisation");
// startActivity(intent);
// }
// });
alertDialog.setView(dialogView); alertDialog.setView(dialogView);
alertDialog.show(); alertDialog.show();
@@ -220,31 +202,36 @@ public class MainActivity extends AppCompatActivity {
} }
}); });
ImageView iconinfo = findViewById(R.id.info_icon);
// theme change // theme change
if (prefs.getInt("themeInt", 0) == 0) { if (prefs.getInt("themeInt", 0) == 0) {
setTheme(R.style.AppTheme0); setTheme(R.style.AppTheme0);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
window.setStatusBarColor(ContextCompat.getColor(this, R.color.white)); window.setStatusBarColor(ContextCompat.getColor(this, R.color.darkwhite));
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.white)); toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.darkwhite));
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.white)); window.setNavigationBarColor(ContextCompat.getColor(this, R.color.darkwhite));
} else { } else {
window.setStatusBarColor(ContextCompat.getColor(this, R.color.black)); window.setStatusBarColor(ContextCompat.getColor(this, R.color.black));
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.black)); window.setNavigationBarColor(ContextCompat.getColor(this, R.color.black));
} }
toolbarTxt.setTextColor(ContextCompat.getColor(this, R.color.accent)); toolbarTxt.setTextColor(ContextCompat.getColor(this, R.color.accent));
bottomNav.setBackgroundColor(ContextCompat.getColor(this, R.color.white)); bottomNav.setBackgroundColor(ContextCompat.getColor(this, R.color.darkwhite));
bottomNav.setItemIconTintList(ContextCompat.getColorStateList(this, R.color.tintlist_light));
bottomNav.setItemTextColor(ContextCompat.getColorStateList(this, R.color.tintlist_light));
chip.setChipBackgroundColor(getResources().getColorStateList(R.color.chip_state_list)); chip.setChipBackgroundColor(getResources().getColorStateList(R.color.chip_state_list));
chip.setTextColor(ContextCompat.getColor(this, R.color.lessdark)); chip.setTextColor(ContextCompat.getColor(this, R.color.lessdark));
bottomSheet.setBackgroundColor(ContextCompat.getColor(this, R.color.white)); bottomSheet.setBackgroundColor(ContextCompat.getColor(this, R.color.darkwhite));
bottomSheetHeader.setTextColor(ContextCompat.getColor(this, R.color.lessdark)); bottomSheetHeader.setTextColor(ContextCompat.getColor(this, R.color.lessdark));
bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lessdark)); bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lessdark));
bottomNavDivider.setBackgroundColor(ContextCompat.getColor(this, R.color.lightgrey)); bottomNavDivider.setBackgroundColor(ContextCompat.getColor(this, R.color.lightgrey));
iconinfo.setColorFilter(ContextCompat.getColor(context, R.color.lessdark), android.graphics.PorterDuff.Mode.SRC_IN);
Bitmap bm = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), bm, ContextCompat.getColor(this, R.color.white)); ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), bm, ContextCompat.getColor(this, R.color.darkwhite));
setTaskDescription(taskDesc); setTaskDescription(taskDesc);
} }
if (prefs.getInt("themeInt", 0) == 1) { if (prefs.getInt("themeInt", 0) == 1) {
@@ -252,8 +239,10 @@ public class MainActivity extends AppCompatActivity {
window.setStatusBarColor(ContextCompat.getColor(this, R.color.background)); window.setStatusBarColor(ContextCompat.getColor(this, R.color.background));
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE); window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.dark)); toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.dark));
toolbarTxt.setTextColor(ContextCompat.getColor(this, R.color.accent)); toolbarTxt.setTextColor(ContextCompat.getColor(this, R.color.accentPastel));
bottomNav.setBackgroundColor(ContextCompat.getColor(this, R.color.dark)); bottomNav.setBackgroundColor(ContextCompat.getColor(this, R.color.dark));
bottomNav.setItemIconTintList(ContextCompat.getColorStateList(this, R.color.tintlist_dark));
bottomNav.setItemTextColor(ContextCompat.getColorStateList(this, R.color.tintlist_dark));
window.setNavigationBarColor(getResources().getColor(R.color.background)); window.setNavigationBarColor(getResources().getColor(R.color.background));
chip.setChipBackgroundColor(getResources().getColorStateList(R.color.chip_state_list_dark)); chip.setChipBackgroundColor(getResources().getColorStateList(R.color.chip_state_list_dark));
chip.setTextColor(ContextCompat.getColor(this, R.color.lightgrey)); chip.setTextColor(ContextCompat.getColor(this, R.color.lightgrey));
@@ -261,6 +250,7 @@ public class MainActivity extends AppCompatActivity {
bottomSheetHeader.setTextColor(ContextCompat.getColor(this, R.color.lightgrey)); bottomSheetHeader.setTextColor(ContextCompat.getColor(this, R.color.lightgrey));
bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lightgrey)); bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lightgrey));
bottomNavDivider.setBackgroundColor(ContextCompat.getColor(this, R.color.darkdivider)); bottomNavDivider.setBackgroundColor(ContextCompat.getColor(this, R.color.darkdivider));
iconinfo.setColorFilter(ContextCompat.getColor(context, R.color.lightgrey), android.graphics.PorterDuff.Mode.SRC_IN);
Bitmap bm = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher); Bitmap bm = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_launcher);
ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), bm, getResources().getColor(R.color.background)); ActivityManager.TaskDescription taskDesc = new ActivityManager.TaskDescription(getString(R.string.app_name), bm, getResources().getColor(R.color.background));
@@ -345,7 +335,6 @@ public class MainActivity extends AppCompatActivity {
} }
if (prefs.getInt("firstTimeOpening", 0) < 2) { if (prefs.getInt("firstTimeOpening", 0) < 2) {
// if (true) {
final Handler bsbIn = new Handler(); final Handler bsbIn = new Handler();
bsbIn.postDelayed(new Runnable() { bsbIn.postDelayed(new Runnable() {
@Override @Override
@@ -449,10 +438,6 @@ public class MainActivity extends AppCompatActivity {
switcher = true; switcher = true;
} }
break; break;
// case R.id.search:
// fragment = new FragmentSearch();
// toolbarTxt.setText(getString(R.string.search));
// break;
case R.id.menu: case R.id.menu:
if (getCurrentFragment().toString().contains("FragmentFood")) { if (getCurrentFragment().toString().contains("FragmentFood")) {
final RecyclerView recyclerView = findViewById(R.id.linear_food); final RecyclerView recyclerView = findViewById(R.id.linear_food);
@@ -1,46 +0,0 @@
package com.denizd.substitutionplan;
import android.graphics.drawable.Drawable;
public class PlanCard {
private Drawable mIcon;
private String mGroup, mDate, mTime, mCourse, mRoom, mAdditional;
public PlanCard(Drawable icon, String group, String date, String time, String course, String room, String additional) {
mIcon = icon;
mGroup = group;
mDate = date;
mTime = time;
mCourse = course;
mRoom = room;
mAdditional = additional;
}
public Drawable getImageResource() {
return mIcon;
}
public String getGroup() {
return mGroup;
}
public String getDate() {
return mDate;
}
public String getTime() {
return mTime;
}
public String getCourse() {
return mCourse;
}
public String getRoom() {
return mRoom;
}
public String getAdditional() {
return mAdditional;
}
}
@@ -10,11 +10,11 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.Color; import android.graphics.Color;
import android.media.RingtoneManager;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Build; import android.os.Build;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.widget.RemoteViews; import android.widget.RemoteViews;
import android.widget.TextView;
import com.madapps.prefrences.EasyPrefrences; import com.madapps.prefrences.EasyPrefrences;
@@ -30,8 +30,6 @@ import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public class ScheduledJobService extends JobService { public class ScheduledJobService extends JobService {
@@ -50,10 +48,6 @@ public class ScheduledJobService extends JobService {
final SharedPreferences.Editor edit = prefs.edit(); final SharedPreferences.Editor edit = prefs.edit();
substViewModel = new SubstViewModel(getApplication()); substViewModel = new SubstViewModel(getApplication());
// substViewModel = ViewModelProviders.of().get(SubstViewModel.class);
// substViewModel.getAllSubst().observe(this, new Observer<List<Subst>>() {
// @Override
// public void onChanged(List<Subst> substs) {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
@@ -72,7 +66,6 @@ public class ScheduledJobService extends JobService {
catch (IOException e) {} catch (IOException e) {}
try { try {
if ((!connection.getHeaderField("Last-Modified").equals(prefs.getString("time", "")))) { if ((!connection.getHeaderField("Last-Modified").equals(prefs.getString("time", "")))) {
// if (true) {
new fetcher(context).execute(); new fetcher(context).execute();
edit.putString("time", connection.getHeaderField("Last-Modified")); edit.putString("time", connection.getHeaderField("Last-Modified"));
edit.apply(); edit.apply();
@@ -83,8 +76,6 @@ public class ScheduledJobService extends JobService {
jobFinished(params, false); jobFinished(params, false);
} }
}).start(); }).start();
// }
// });
} }
@Override @Override
@@ -95,18 +86,16 @@ public class ScheduledJobService extends JobService {
private class fetcher extends AsyncTask<Void, Void, Void> { private class fetcher extends AsyncTask<Void, Void, Void> {
private int count = 0, columns = 0, pCount = 0, priority = 200; private int count = 0, pCount = 0, priority = 200;
Context mContext; Context mContext;
String notifText = "", foodInfo = "", informational = ""; String notifText = "", informational = "";
String[] groupS, dateS, timeS, courseS, roomS, additionalS; String[] groupS, dateS, timeS, courseS, roomS, additionalS;
boolean attempt = false, emptyIcon; boolean attempt = false, emptyIcon;
URL url; URL url;
URLConnection connection; URLConnection connection;
String modified; String modified;
Elements rows, paragraphs; Elements rows, paragraphs;
Elements[] paragraphsFood = new Elements[2];
Elements foodElements; Elements foodElements;
Element[] dateFood = new Element[2], blockFood = new Element[2];
Document doc, docFood; Document doc, docFood;
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
String channelId = "general"; String channelId = "general";
@@ -228,7 +217,7 @@ public class ScheduledJobService extends JobService {
roomS[i] = cols.get(4).text(); roomS[i] = cols.get(4).text();
additionalS[i] = cols.get(5).text(); additionalS[i] = cols.get(5).text();
int drawable = icons(courseS[i]); int drawable = DataGetter.getIcon(courseS[i]);
Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority); Subst subst = new Subst(drawable, groupS[i], dateS[i], timeS[i], courseS[i], roomS[i], additionalS[i], priority);
priority--; priority--;
substViewModel.insert(subst); substViewModel.insert(subst);
@@ -268,12 +257,9 @@ public class ScheduledJobService extends JobService {
notificationLayout.setTextViewText(R.id.notification_textview, notifText); notificationLayout.setTextViewText(R.id.notification_textview, notifText);
if (!notifText.isEmpty()) { if (!notifText.isEmpty()) {
Notification notification = null; Notification notification;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
notification = new NotificationCompat.Builder(mContext) // TODO switch out the deprecated notification delivery method notification = new NotificationCompat.Builder(mContext) // TODO switch out the deprecated notification delivery method
// .setContentTitle(getString(R.string.subst))
// .setStyle(new NotificationCompat.BigTextStyle()
// .bigText(notifText))
.setStyle(new NotificationCompat.DecoratedCustomViewStyle()) .setStyle(new NotificationCompat.DecoratedCustomViewStyle())
.setCustomContentView(notificationLayout) .setCustomContentView(notificationLayout)
.setSmallIcon(R.drawable.ic_avh) .setSmallIcon(R.drawable.ic_avh)
@@ -283,9 +269,6 @@ public class ScheduledJobService extends JobService {
.build(); .build();
} else { } else {
notification = new NotificationCompat.Builder(mContext) notification = new NotificationCompat.Builder(mContext)
// .setContentTitle(getString(R.string.subst))
// .setStyle(new NotificationCompat.BigTextStyle()
// .bigText(notifText))
.setStyle(new NotificationCompat.DecoratedCustomViewStyle()) .setStyle(new NotificationCompat.DecoratedCustomViewStyle())
.setCustomContentView(notificationLayout) .setCustomContentView(notificationLayout)
.setSmallIcon(R.drawable.ic_avh) .setSmallIcon(R.drawable.ic_avh)
@@ -293,6 +276,7 @@ public class ScheduledJobService extends JobService {
.setAutoCancel(true) .setAutoCancel(true)
.build(); .build();
} }
notification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
manager.notify(1, notification); manager.notify(1, notification);
} }
@@ -300,64 +284,6 @@ public class ScheduledJobService extends JobService {
return null; return null;
} }
private int icons(String course) {
emptyIcon = false;
if (course.toLowerCase().contains("deu") || course.toLowerCase().contains("dep") || course.toLowerCase().contains("daz")) {
return R.drawable.ic_german;
} else if (course.toLowerCase().contains("mat") || course.toLowerCase().contains("map")) {
return R.drawable.ic_maths;
} else if (course.toLowerCase().contains("eng") || course.toLowerCase().contains("enp") || course.toLowerCase().contains("ena")) {
return R.drawable.ic_english;
} else if (course.toLowerCase().contains("spo") || course.toLowerCase().contains("spp") || course.toLowerCase().contains("spth")) {
return R.drawable.ic_pe;
} else if (course.toLowerCase().contains("pol") || course.toLowerCase().contains("pop")) {
return R.drawable.ic_politics;
} else if (course.toLowerCase().contains("dar") || course.toLowerCase().contains("dap")) {
return R.drawable.ic_drama;
} else if (course.toLowerCase().contains("phy") || course.toLowerCase().contains("php")) {
return R.drawable.ic_physics;
} else if (course.toLowerCase().contains("bio") || course.toLowerCase().contains("bip") || course.toLowerCase().contains("nw")) {
return R.drawable.ic_biology;
} else if (course.toLowerCase().contains("che") || course.toLowerCase().contains("chp")) {
return R.drawable.ic_chemistry;
} else if (course.toLowerCase().contains("phi") || course.toLowerCase().contains("psp")) {
return R.drawable.ic_philosophy;
} else if (course.toLowerCase().contains("laa") || course.toLowerCase().contains("laf") || course.toLowerCase().contains("lat")) {
return R.drawable.ic_latin;
} else if (course.toLowerCase().contains("spa") || course.toLowerCase().contains("spf")) {
return R.drawable.ic_spanish;
} else if (course.toLowerCase().contains("fra") || course.toLowerCase().contains("frf") || course.toLowerCase().contains("frz")) {
return R.drawable.ic_french;
} else if (course.toLowerCase().contains("inf")) {
return R.drawable.ic_compsci;
} else if (course.toLowerCase().contains("ges")) {
return R.drawable.ic_history;
} else if (course.toLowerCase().contains("rel")) {
return R.drawable.ic_religion;
} else if (course.toLowerCase().contains("geg") || course.toLowerCase().contains("wuk")) {
return R.drawable.ic_geography;
} else if (course.toLowerCase().contains("kun")) {
return R.drawable.ic_arts;
} else if (course.toLowerCase().contains("mus")) {
return R.drawable.ic_music;
} else if (course.toLowerCase().contains("tue")) {
return R.drawable.ic_turkish;
} else if (course.toLowerCase().contains("chi")) {
return R.drawable.ic_chinese;
} else if (course.toLowerCase().contains("gll")) {
return R.drawable.ic_gll;
} else if (course.toLowerCase().contains("wat")) {
return R.drawable.ic_wat;
} else if (course.toLowerCase().contains("för")) {
return R.drawable.ic_help;
} else if (course.toLowerCase().contains("wp") || course.toLowerCase().contains("met")) {
return R.drawable.ic_pencil;
} else {
emptyIcon = true;
return R.drawable.ic_empty;
}
}
@Override @Override
protected void onPostExecute(Void result) {} protected void onPostExecute(Void result) {}
} }
@@ -1,13 +1,9 @@
package com.denizd.substitutionplan; package com.denizd.substitutionplan;
import android.content.Context; import android.content.Context;
import android.os.AsyncTask;
import androidx.annotation.NonNull;
import androidx.room.Database; import androidx.room.Database;
import androidx.room.Room; import androidx.room.Room;
import androidx.room.RoomDatabase; import androidx.room.RoomDatabase;
import androidx.sqlite.db.SupportSQLiteDatabase;
@Database(entities = {Subst.class}, version = 2, exportSchema = false) @Database(entities = {Subst.class}, version = 2, exportSchema = false)
public abstract class SubstDatabase extends RoomDatabase { public abstract class SubstDatabase extends RoomDatabase {
@@ -26,27 +22,4 @@ public abstract class SubstDatabase extends RoomDatabase {
} }
return instance; return instance;
} }
// private static RoomDatabase.Callback roomCallback = new RoomDatabase.Callback() { // initial population
// @Override
// public void onCreate(@NonNull SupportSQLiteDatabase db) {
// super.onCreate(db);
// new PopulateDBAsync(instance).execute();
// }
// };
//
// private static class PopulateDBAsync extends AsyncTask<Void, Void, Void> {
//
// private SubstDao substDao;
//
// private PopulateDBAsync(SubstDatabase db) {
// substDao = db.substDao();
// }
//
// @Override
// protected Void doInBackground(Void... voids) {
// substDao.insert(new Subst(R.drawable.ic_avh,"Group", "Date", "Time", "Course", "Room", "Additional", 0));
// return null;
// }
// }
} }
@@ -1,26 +1,5 @@
package com.denizd.substitutionplan; package com.denizd.substitutionplan;
public class names { public class names {
protected static String boy[] = { "Cedric Grislawski", // excluded are most boys from Physical Education
// profile (no offense) and me
"Dawid Kniola", "Jonas Köstergarten", "Jakob Moerschner", "Siamak Nemati", "Hendrik Plönnings",
"Jan Rohmann", "Anton Rosenberger", "Christoph Senft", "Jan Mika Sieckendieck", "Alexander Sinaj",
"Nico Tischer", "Nhat Vinh Tran", "Leon Becker", "Youssef Beltagi", "Erich Kerkesner", "Alex Lick",
"Oskar Piskorz", "Theo Recktor", "Eray Vatansever", "Dennis Wojciechowski", "Übeydullah Alkan",
"Yahya Almarashli", "Sinan Aydin", "Rick Büteröwe", "Levin Dropp", "Silvester Jermolajew", "Tolgay Kekilli",
"Dennis Lange", "Aras Mahmoud", "Batuhan Özcan", "Michael Rek", "Khabat Sharif", "Anbinh Tran",
"Bastian Westerboer", "Abdulwahab Alshebli", "Kelechi Gaius", "Armin Großmann", "Anes Halep",
"Marco Jankowski", "Emirhan Kaplan", "Alexander Kofmann", "Tobi Derek Köhler", "Vasilije Nedeljkovic",
"Batu Öcal", "Paul Rehbohm" };
protected static String girl[] = { "Mayra Dronia", // excluded are the girls from Physical Education profile
// (no offense)
"Shalin Ramadan", "Nigina Amin", "Mariya Kheder", "Niegen Khosrawi", "Dayana Osipova",
"Julia Petri", "Laura Pister", "Dana Alyoussef", "Ilkem Kahramanoglu", "Rozita Amiri", "Mirja Arneke",
"Nastasja Banik", "Anni Kienke", "Benedite Mateta", "Leonie Pohl", "Cecillia Sawires", "Patrycja Smółka",
"Elif Zencirkiran", "Nusyba Al Semadi", "Vivien Bruns", "Yasemin Dal", "Svenja Demuth", "Nina Groß",
"Kim Lahmeyer", "Luca Minschke", "Kim Reschke", "Amélie Schnellecke", "Delal Secer", "Xenia Segijanski",
"Melisa Tas", "Kim Völker", "Banu Yari", "Zeinab Ali", "Mariam Bannout", "Stefanie Fahl", "Yamaty Gaye",
"Anna-Sophia Haeberle", "Finja Hastedt", "Viktoria Hammermeister", "Isabel Horn", "Laura Kern",
"Melanie Kleinermann", "Målin Kollhoff", "Darja Maier", "Lisa Maier", "Naura Nadzifah", "Janina Roelfs",
"Vanessa Scheifler", "Mara Thies", "Lieli Umar", "Leonie Welk", "Betraben Yacoub" };
} }
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/accentPastel" android:state_checked="true" />
<item android:color="@color/hint" />
</selector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/accent" android:state_checked="true" />
<item android:color="@color/hint" />
</selector>
@@ -1,16 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- The android:opacity=”opaque” line — this is critical in preventing a flash of black as your theme transitions. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color, preferably the same as your normal theme -->
<item android:drawable="?attr/colorAccent"/> <item android:drawable="?attr/colorAccent"/>
<!-- Your product logo - 144dp color version of your app icon -->
<!--<item>-->
<!--<bitmap android:src="@drawable/ic_avh"-->
<!--android:gravity="center"/>-->
<!--</item>-->
<item android:drawable="@drawable/ic_avhlogo" <item android:drawable="@drawable/ic_avhlogo"
android:gravity="center" android:gravity="center"
android:scaleType="centerInside"> android:scaleType="centerInside">
+4 -2
View File
@@ -90,12 +90,14 @@
android:layout_height="56dp" android:layout_height="56dp"
android:layout_marginBottom="0dp" android:layout_marginBottom="0dp"
app:elevation="0dp" app:elevation="0dp"
app:itemIconTint="@color/bottom_nav_color_avhblue"
app:itemTextColor="@color/bottom_nav_color_avhblue"
app:layout_anchor="@+id/bottom_sheet" app:layout_anchor="@+id/bottom_sheet"
android:layout_gravity="bottom" android:layout_gravity="bottom"
app:menu="@menu/nav_items"/> app:menu="@menu/nav_items"/>
<!-- app:itemIconTint="@drawable/tintlist_light"-->
<!-- app:itemTextColor="@drawable/tintlist_light"-->
<View <View
android:id="@+id/bottom_nav_divider" android:id="@+id/bottom_nav_divider"
android:layout_width="match_parent" android:layout_width="match_parent"
+17 -2
View File
@@ -22,21 +22,36 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="4dp">
<ImageView
android:id="@+id/info_icon"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/ic_information"/>
<TextView <TextView
android:id="@+id/bottom_sheet_header" android:id="@+id/bottom_sheet_header"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:gravity="top|start" android:gravity="top|start"
android:text="@string/information" android:text="@string/information"
android:textSize="16sp"/> android:textSize="16sp"/>
</LinearLayout>
<TextView <TextView
android:id="@+id/bottom_sheet_text" android:id="@+id/bottom_sheet_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_margin="8dp" android:layout_margin="16dp"
android:gravity="top|start" android:gravity="top|start"
android:text="@string/noinfo" android:text="@string/noinfo"
android:textSize="12sp"/> android:textSize="12sp"/>
+17 -31
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorBackground"> android:background="?attr/colorBackground">
@@ -10,7 +9,8 @@
android:id="@+id/nsvsettings" android:id="@+id/nsvsettings"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:fillViewport="true"> android:fillViewport="true"
android:scrollbars="vertical">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -32,6 +32,8 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/txtLayoutName" android:id="@+id/txtLayoutName"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:boxStrokeColor="?attr/colorAccent"
app:boxStrokeWidth="2dp"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
@@ -44,25 +46,18 @@
app:layout_constraintTop_toBottomOf="@+id/txtPersonalise" app:layout_constraintTop_toBottomOf="@+id/txtPersonalise"
android:importantForAutofill="no"> android:importantForAutofill="no">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txtName" android:id="@+id/txtName"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:ems="10" android:ems="10"
android:gravity="start" android:gravity="start"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:singleLine="true" android:singleLine="true"
android:textAlignment="textStart"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="?attr/colorText" android:textColor="?attr/colorText"
android:textCursorDrawable="@null" android:textSize="14sp"/>
android:textSize="14sp"
android:theme="@style/EditTextTheme" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@@ -215,6 +210,8 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/txtLayoutClasses" android:id="@+id/txtLayoutClasses"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:boxStrokeColor="?attr/colorAccent"
app:boxStrokeWidth="2dp"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
@@ -227,24 +224,18 @@
app:layout_constraintTop_toBottomOf="@+id/txtFilter" app:layout_constraintTop_toBottomOf="@+id/txtFilter"
android:importantForAutofill="no"> android:importantForAutofill="no">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txtClasses" android:id="@+id/txtClasses"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:ems="10" android:ems="10"
android:gravity="start" android:gravity="start"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:singleLine="true" android:singleLine="true"
android:textAlignment="textStart"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="?attr/colorText" android:textColor="?attr/colorText"
android:textSize="14sp" android:textSize="14sp"/>
android:theme="@style/EditTextTheme" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@@ -265,34 +256,29 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:hint="@string/courses" android:hint="@string/courses"
android:importantForAutofill="no"
android:textColorHint="?attr/colorHint" android:textColorHint="?attr/colorHint"
app:boxStrokeColor="?attr/colorAccent"
app:boxStrokeWidth="2dp"
app:layout_constraintEnd_toStartOf="@+id/chipHelpCourses" app:layout_constraintEnd_toStartOf="@+id/chipHelpCourses"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="@+id/txtLayoutClasses"
app:layout_constraintTop_toBottomOf="@+id/txtLayoutClasses" app:layout_constraintTop_toBottomOf="@+id/txtLayoutClasses">
android:importantForAutofill="no">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txtCourses" android:id="@+id/txtCourses"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:ems="10" android:ems="10"
android:gravity="start" android:gravity="start"
android:imeOptions="flagNoExtractUi" android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions" android:inputType="textNoSuggestions"
android:singleLine="true" android:singleLine="true"
android:textAlignment="textStart"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="?attr/colorText" android:textColor="?attr/colorText"
android:textSize="14sp" android:textSize="14sp" />
android:theme="@style/EditTextTheme" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
+43 -16
View File
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?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"
android:orientation="vertical" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
@@ -40,16 +42,28 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<EditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/dating_txt1" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:boxStrokeColor="@color/datingPink"
app:boxStrokeWidth="2dp"
android:layout_width="0px" android:layout_width="0px"
android:layout_weight="7" android:layout_weight="7"
android:backgroundTint="?attr/colorText"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/boy" android:layout_marginTop="2dp"
android:inputType="textNoSuggestions" android:layout_marginBottom="2dp"
android:textColorHint="?attr/colorHint" android:textColorHint="?attr/colorHint"
android:textColor="?attr/colorText"/> android:hint="@string/boy"
android:importantForAutofill="no">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dating_txt1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:textColor="?attr/colorText"
android:singleLine="true"/>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox <CheckBox
android:id="@+id/cb1" android:id="@+id/cb1"
@@ -66,16 +80,28 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<EditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/dating_txt2" style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:boxStrokeColor="@color/datingPink"
app:boxStrokeWidth="2dp"
android:layout_width="0px" android:layout_width="0px"
android:layout_weight="7" android:layout_weight="7"
android:backgroundTint="?attr/colorText"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/girl" android:layout_marginTop="2dp"
android:inputType="textNoSuggestions" android:layout_marginBottom="2dp"
android:textColorHint="?attr/colorHint" android:textColorHint="?attr/colorHint"
android:textColor="?attr/colorText"/> android:hint="@string/girl"
android:importantForAutofill="no">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dating_txt2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textNoSuggestions"
android:textColor="?attr/colorText"
android:singleLine="true"/>
</com.google.android.material.textfield.TextInputLayout>
<CheckBox <CheckBox
android:id="@+id/cb2" android:id="@+id/cb2"
@@ -97,10 +123,11 @@
android:layout_width="0px" android:layout_width="0px"
android:layout_weight="5" android:layout_weight="5"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/datingPink"
android:text="@string/calculate" android:text="@string/calculate"
android:textColor="@color/white" android:textColor="@color/datingPink"
android:layout_gravity="start|center_vertical"/> app:strokeColor="@color/datingPink"
android:layout_gravity="start|center_vertical"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"/>
<TextView <TextView
android:id="@+id/dating_txtp" android:id="@+id/dating_txtp"
+15 -9
View File
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?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"
android:orientation="vertical" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
@@ -36,22 +38,26 @@
<Button <Button
android:id="@+id/btnResetLaunch" android:id="@+id/btnResetLaunch"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/accent" android:textColor="?attr/colorAccent"
android:textColor="@color/white" app:strokeColor="?attr/colorAccent"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:text="Reset launch counter"/> android:layout_marginEnd="24dp"
android:text="Reset launch counter"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"/>
<Button <Button
android:id="@+id/btnResetNotif" android:id="@+id/btnResetNotif"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="@color/accent" android:textColor="?attr/colorAccent"
android:textColor="@color/white" app:strokeColor="?attr/colorAccent"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:text="Reset notification counter"/> android:text="Reset notification counter"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"/>
</LinearLayout> </LinearLayout>
+26 -6
View File
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?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"
android:orientation="vertical" android:layout_width="match_parent" xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<TextView <TextView
@@ -34,19 +36,37 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:textColor="?attr/colorText"/> android:textColor="?attr/colorText"/>
<EditText <com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
app:boxStrokeColor="?attr/colorAccent"
app:boxStrokeWidth="2dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:textColorHint="?attr/colorHint"
android:importantForAutofill="no">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dialog_edittext" android:id="@+id/dialog_edittext"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?attr/colorText"/> android:textColor="?attr/colorText"
android:ems="10"
android:imeOptions="flagNoExtractUi"
android:inputType="textNoSuggestions"
android:singleLine="true"/>
</com.google.android.material.textfield.TextInputLayout>
<Button <Button
android:id="@+id/dialog_button" android:id="@+id/dialog_button"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:backgroundTint="?attr/colorAccent" android:textColor="?attr/colorAccent"
android:text="@string/positivebutton" android:text="@string/positivebutton"
android:textColor="@color/white"/> style="@style/Widget.MaterialComponents.Button.OutlinedButton"
app:strokeColor="?attr/colorAccent"/>
</LinearLayout> </LinearLayout>
+2 -3
View File
@@ -19,8 +19,7 @@
android:id="@+id/linear_food" android:id="@+id/linear_food"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layoutAnimation="@anim/layout_animation_fall_down"> android:layoutAnimation="@anim/layout_animation_fall_down"
android:scrollbars="vertical"/>
</androidx.recyclerview.widget.RecyclerView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
+2 -1
View File
@@ -53,7 +53,8 @@
android:id="@+id/linearRecycler" android:id="@+id/linearRecycler"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layoutAnimation="@anim/layout_animation_fall_down"/> android:layoutAnimation="@anim/layout_animation_fall_down"
android:scrollbars="vertical"/>
</LinearLayout> </LinearLayout>
-5
View File
@@ -11,11 +11,6 @@
android:icon="@drawable/ic_idea" android:icon="@drawable/ic_idea"
android:title="@string/personal" android:title="@string/personal"
android:enabled="true"/> android:enabled="true"/>
<!--<item-->
<!--android:id="@+id/search"-->
<!--android:icon="@drawable/ic_magnifying_glass"-->
<!--android:title="@string/search"-->
<!--android:enabled="true"/>-->
<item <item
android:id="@+id/menu" android:id="@+id/menu"
android:icon="@drawable/ic_tomato" android:icon="@drawable/ic_tomato"
+15 -5
View File
@@ -1,17 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources xmlns:tools="http://schemas.android.com/tools">
<color name="background">#1B1B1B</color> <color name="background">#121212</color>
<color name="colorChipLight">#e0e0e0</color> <color name="colorChipLight">#e0e0e0</color>
<color name="colorChipDark">#424242</color> <color name="colorChipDark">#424242</color>
<color name="white">#FFFFFF</color> <color name="white">#FFFFFF</color>
<color name="black">#000000</color> <color name="black">#000000</color>
<color name="accent">#448aff</color> <color name="accent">#448aff</color>
<color name="dark">#1B1B1B</color> <color name="accentPastel">#64b5f6</color>
<color name="lessdark">#212121</color> <color name="dark">#121212</color>
<color name="lightgrey">#e0e0e0</color> <color name="lessdark">#1E1E1E</color>
<color name="lightgrey">#bdbdbd</color>
<color name="textDark">#212121</color>
<color name="textLight">#e0e0e0</color>
<color name="darkdivider">#313131</color> <color name="darkdivider">#313131</color>
<color name="darkwhite">#eeeeee</color>
<color name="lightwhite">#f5f5f5</color>
<color name="datingPink">#d81b60</color> <color name="datingPink">#d81b60</color>
<color name="hint">#9e9e9e</color> <color name="hint">#9e9e9e</color>
@@ -41,5 +49,7 @@
<color name="neonyellow">#FFEA00</color> <color name="neonyellow">#FFEA00</color>
<color name="neonorange">#FF3D00</color> <color name="neonorange">#FF3D00</color>
<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#757575</color>
</resources> </resources>
-11
View File
@@ -147,15 +147,4 @@
<string name="showinfo">Show info tab in navigation bar</string> <string name="showinfo">Show info tab in navigation bar</string>
<string name="swipeindependent">Independent of swipe gesture</string> <string name="swipeindependent">Independent of swipe gesture</string>
<!--<string name="avhblue">AvH-Blue</string>-->
<!--<string name="rosered">AvH-Blue</string>-->
<!--<string name="sunsetorange">AvH-Blue</string>-->
<!--<string name="datingsimpink">AvH-Blue</string>-->
<!--<string name="deepviolet">AvH-Blue</string>-->
<!--<string name="lessdeepviolet">AvH-Blue</string>-->
<!--<string name="mathematicalblue">AvH-Blue</string>-->
<!--<string name="forestgreen">AvH-Blue</string>-->
<!--<string name="grassgreen">AvH-Blue</string>-->
</resources> </resources>
+10 -292
View File
@@ -1,16 +1,5 @@
<resources> <resources>
<!--// 0 avh blue: default-->
<!--// 1 rose red: #c62828-->
<!--// 2 dating sim pink: #d81b60-->
<!--// 3 deep violet: #4a148c-->
<!--// 4 less deep violet: #673ab7-->
<!--// 5 mathematical blue: #303f9f-->
<!--// 6 water blue: #1976d2-->
<!--// 7 forest green: #00695c-->
<!--// 8 grass green: #2e7d32-->
<!--// 9 sunset orange: #bf360c-->
<style name="SelectableItemTheme"> <style name="SelectableItemTheme">
<item name="colorControlHighlight">#448aff</item> <item name="colorControlHighlight">#448aff</item>
</style> </style>
@@ -24,8 +13,8 @@
<item name="colorPrimary">#448aff</item> <item name="colorPrimary">#448aff</item>
<item name="colorPrimaryDark">#FFFFFF</item> <item name="colorPrimaryDark">#FFFFFF</item>
<item name="colorAccent">#448aff</item> <item name="colorAccent">#448aff</item>
<item name="colorBackground">#FFFFFF</item> <item name="colorBackground">#eeeeee</item>
<item name="colorBackgroundCard">#FFFFFF</item> <item name="colorBackgroundCard">#f5f5f5</item>
<item name="colorText">#212121</item> <item name="colorText">#212121</item>
<item name="colorHintLight">#212121</item> <item name="colorHintLight">#212121</item>
<item name="colorHint">#9e9e9e</item> <item name="colorHint">#9e9e9e</item>
@@ -37,302 +26,31 @@
</style> </style>
<style name="AppTheme0Dark" parent="Theme.MaterialComponents.Light.DarkActionBar"> <style name="AppTheme0Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="colorPrimary">#448aff</item> <item name="colorPrimary">#64b5f6</item>
<item name="colorPrimaryDark">#1B1B1B</item> <item name="colorPrimaryDark">#121212</item>
<item name="colorAccent">#448aff</item> <item name="colorAccent">#64b5f6</item>
<item name="colorBackground">#1B1B1B</item> <item name="colorBackground">#121212</item>
<item name="colorBackgroundCard">#212121</item> <item name="colorBackgroundCard">#1E1E1E</item>
<item name="colorText">#e0e0e0</item> <item name="colorText">#e0e0e0</item>
<item name="colorHintLight">#e0e0e0</item> <item name="colorHintLight">#e0e0e0</item>
<item name="colorHint">#9e9e9e</item> <item name="colorHint">#9e9e9e</item>
<item name="colorHintDark">#757575</item> <item name="colorHintDark">#757575</item>
<item name="android:fontFamily">@font/manrope_medium</item> <item name="android:fontFamily">@font/manrope_medium</item>
<item name="referenceTextColor">?attr/colorHint</item> <item name="referenceTextColor">?attr/colorHint</item>
<item name="colorChip">#212121</item> <item name="colorChip">#1E1E1E</item>
<item name="android:colorEdgeEffect">#9e9e9e</item> <item name="android:colorEdgeEffect">#9e9e9e</item>
</style> </style>
<style name="AlertDialogCustomLight" parent="Theme.AppCompat.Light.Dialog.Alert"> <style name="AlertDialogCustomLight" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">#FFFFFF</item> <item name="android:background">#eeeeee</item>
<item name="android:textColorPrimary">#212121</item> <item name="android:textColorPrimary">#212121</item>
</style> </style>
<style name="AlertDialogCustomDark" parent="Theme.AppCompat.Light.Dialog.Alert"> <style name="AlertDialogCustomDark" parent="Theme.AppCompat.Light.Dialog.Alert">
<item name="android:background">#1B1B1B</item> <item name="android:background">#121212</item>
<item name="android:textColorPrimary">#e0e0e0</item> <item name="android:textColorPrimary">#e0e0e0</item>
</style> </style>
<!--<style name="AppTheme1" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#c62828</item>-->
<!--<item name="colorPrimaryDark">#c62828</item>-->
<!--<item name="colorAccent">#c62828</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--<item name="selector">@color/bottom_nav_color_avhblue</item>-->
<!--</style>-->
<!--<style name="AppTheme1Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#c62828</item>-->
<!--<item name="colorPrimaryDark">#c62828</item>-->
<!--<item name="colorAccent">#c62828</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme2" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#d81b60</item>-->
<!--<item name="colorPrimaryDark">#d81b60</item>-->
<!--<item name="colorAccent">#d81b60</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme2Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#d81b60</item>-->
<!--<item name="colorPrimaryDark">#d81b60</item>-->
<!--<item name="colorAccent">#d81b60</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme3" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#4a148c</item>-->
<!--<item name="colorPrimaryDark">#4a148c</item>-->
<!--<item name="colorAccent">#4a148c</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme3Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#4a148c</item>-->
<!--<item name="colorPrimaryDark">#4a148c</item>-->
<!--<item name="colorAccent">#4a148c</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme4" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#673ab7</item>-->
<!--<item name="colorPrimaryDark">#673ab7</item>-->
<!--<item name="colorAccent">#673ab7</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme4Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#673ab7</item>-->
<!--<item name="colorPrimaryDark">#673ab7</item>-->
<!--<item name="colorAccent">#673ab7</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme5" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#303f9f</item>-->
<!--<item name="colorPrimaryDark">#303f9f</item>-->
<!--<item name="colorAccent">#303f9f</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme5Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#303f9f</item>-->
<!--<item name="colorPrimaryDark">#303f9f</item>-->
<!--<item name="colorAccent">#303f9f</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme6" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#1976d2</item>-->
<!--<item name="colorPrimaryDark">#1976d2</item>-->
<!--<item name="colorAccent">#1976d2</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme6Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#1976d2</item>-->
<!--<item name="colorPrimaryDark">#1976d2</item>-->
<!--<item name="colorAccent">#1976d2</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme7" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#00695c</item>-->
<!--<item name="colorPrimaryDark">#00695c</item>-->
<!--<item name="colorAccent">#00695c</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme7Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#00695c</item>-->
<!--<item name="colorPrimaryDark">#00695c</item>-->
<!--<item name="colorAccent">#00695c</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme8" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#2e7d32</item>-->
<!--<item name="colorPrimaryDark">#2e7d32</item>-->
<!--<item name="colorAccent">#2e7d32</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme8Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#2e7d32</item>-->
<!--<item name="colorPrimaryDark">#2e7d32</item>-->
<!--<item name="colorAccent">#2e7d32</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme9" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#bf360c</item>-->
<!--<item name="colorPrimaryDark">#bf360c</item>-->
<!--<item name="colorAccent">#bf360c</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme9Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#bf360c</item>-->
<!--<item name="colorPrimaryDark">#bf360c</item>-->
<!--<item name="colorAccent">#bf360c</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme10" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#1B1B1B</item>-->
<!--<item name="colorPrimaryDark">#1B1B1B</item>-->
<!--<item name="colorAccent">#1B1B1B</item>-->
<!--<item name="colorBackground">#FFFFFF</item>-->
<!--<item name="colorBackgroundCard">#FFFFFF</item>-->
<!--<item name="colorText">#212121</item>-->
<!--<item name="colorHintLight">#212121</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppTheme10Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">-->
<!--<item name="colorPrimary">#1B1B1B</item>-->
<!--<item name="colorPrimaryDark">#1B1B1B</item>-->
<!--<item name="colorAccent">#1B1B1B</item>-->
<!--<item name="colorBackground">#1B1B1B</item>-->
<!--<item name="colorBackgroundCard">#1B1B1B</item>-->
<!--<item name="colorText">#e0e0e0</item>-->
<!--<item name="colorHintLight">#e0e0e0</item>-->
<!--<item name="colorHint">#9e9e9e</item>-->
<!--<item name="android:fontFamily">@font/manrope_medium</item>-->
<!--<item name="referenceTextColor">?attr/colorHint</item>-->
<!--</style>-->
<!--<style name="AppThemeLight.NoActionBar">-->
<!--<item name="windowActionBar">false</item>-->
<!--<item name="windowNoTitle">true</item>-->
<!--</style>-->
<!--<style name="AppThemeDark.NoActionBar">-->
<!--<item name="windowActionBar">false</item>-->
<!--<item name="windowNoTitle">true</item>-->
<!--</style>-->
<style name="AppThemeLight.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> <style name="AppThemeLight.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="colorControlNormal">#000000</item> <item name="colorControlNormal">#000000</item>
</style> </style>