Archived
Version 1.3.0 (little design overhaul) with additional fixes
This commit is contained in:
@@ -25,7 +25,8 @@
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/AppThemeLight.Launcher">
|
||||
android:theme="@style/AppThemeLight.Launcher"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
||||
@@ -198,9 +198,9 @@ public class CardAdapter extends RecyclerView.Adapter<CardAdapter.CardViewHolder
|
||||
} finally {
|
||||
if (colour == 0) {
|
||||
if (prefs.getInt("themeInt", 0) == 1) {
|
||||
colour = R.color.lightgrey;
|
||||
colour = R.color.textLight;
|
||||
} else {
|
||||
colour = R.color.lessdark;
|
||||
colour = R.color.textDark;
|
||||
}
|
||||
}
|
||||
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.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.Animatable;
|
||||
@@ -14,13 +13,11 @@ import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewAnimationUtils;
|
||||
@@ -36,14 +33,11 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||
import com.jaredrummler.android.device.DeviceName;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public class FirstTime extends AppCompatActivity {
|
||||
|
||||
private String manufacturer;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -85,32 +79,6 @@ public class FirstTime extends AppCompatActivity {
|
||||
final ImageButton helpClasses = findViewById(R.id.chipHelpClasses);
|
||||
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() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package com.denizd.substitutionplan;
|
||||
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
public class Food {
|
||||
|
||||
private String food;
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.denizd.substitutionplan;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -3,9 +3,7 @@ package com.denizd.substitutionplan
|
||||
import android.content.SharedPreferences
|
||||
import android.os.Bundle
|
||||
import android.preference.PreferenceManager
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -22,19 +22,15 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.LayoutAnimationController;
|
||||
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 static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||
import static com.google.android.material.snackbar.Snackbar.make;
|
||||
|
||||
public class FragmentFood extends Fragment {
|
||||
@@ -55,9 +51,6 @@ public class FragmentFood extends Fragment {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood);
|
||||
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());
|
||||
ArrayList<String> foodListPopulation = new ArrayList<>(easyPrefs.getListString("foodListPrefs"));
|
||||
@@ -70,12 +63,6 @@ public class FragmentFood extends Fragment {
|
||||
mAdapter = new FoodAdapter(foodArrayList);
|
||||
recyclerView.setAdapter(mAdapter);
|
||||
|
||||
// try {
|
||||
// recyclerView.removeAllViews();
|
||||
// } catch (NullPointerException e) {
|
||||
//
|
||||
// }
|
||||
|
||||
for (int i = 0; i < foodListPopulation.size(); i++) {
|
||||
foodArrayList.add(new Food(foodListPopulation.get(i)));
|
||||
mAdapter.setFood(foodArrayList);
|
||||
@@ -104,8 +91,6 @@ public class FragmentFood extends Fragment {
|
||||
boolean attempt = false, npe = false;
|
||||
Elements foodElements;
|
||||
Document docFood;
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
final SharedPreferences.Editor edit = prefs.edit();
|
||||
final SwipeRefreshLayout pullToRefresh = getView().findViewById(R.id.pullToRefreshFood);
|
||||
|
||||
protected fetcher() {
|
||||
@@ -122,7 +107,6 @@ public class FragmentFood extends Fragment {
|
||||
|
||||
progressBar.setProgress(0);
|
||||
progressBar.setMax(foodElements.size());
|
||||
// progressBar.incrementProgressBy(paragraphs[0].size());
|
||||
} catch (IOException e1) {
|
||||
npe = true;
|
||||
} catch (NullPointerException e1) {
|
||||
@@ -197,9 +181,6 @@ public class FragmentFood extends Fragment {
|
||||
|
||||
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++) {
|
||||
foodArrayList.add(new Food(foodListPopulation.get(i)));
|
||||
mAdapter.setFood(foodArrayList);
|
||||
@@ -240,7 +221,6 @@ public class FragmentFood extends Fragment {
|
||||
}
|
||||
|
||||
} catch (NullPointerException e) {
|
||||
// pullToRefresh.setRefreshing(false);
|
||||
}
|
||||
} else if (npe) {
|
||||
pullToRefresh.setRefreshing(false);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.denizd.substitutionplan;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
@@ -11,6 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.madapps.prefrences.EasyPrefrences;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
@@ -43,7 +43,6 @@ import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static android.content.Context.LAYOUT_INFLATER_SERVICE;
|
||||
import static com.google.android.material.snackbar.Snackbar.make;
|
||||
|
||||
public class FragmentPersonal extends Fragment {
|
||||
@@ -55,6 +54,7 @@ public class FragmentPersonal extends Fragment {
|
||||
private TextView bottomSheetText;
|
||||
private SubstViewModel substViewModel;
|
||||
private boolean persPlanEmpty;
|
||||
private EasyPrefrences easyPrefs;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -69,6 +69,7 @@ public class FragmentPersonal extends Fragment {
|
||||
bottomSheetText = getView().getRootView().findViewById(R.id.bottom_sheet_text);
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
||||
final SharedPreferences.Editor edit = prefs.edit();
|
||||
easyPrefs = new EasyPrefrences(getContext());
|
||||
|
||||
bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo)));
|
||||
|
||||
@@ -144,6 +145,7 @@ public class FragmentPersonal extends Fragment {
|
||||
recyclerView.scheduleLayoutAnimation();
|
||||
mAdapter.setSubst(planCardList);
|
||||
bottomSheetText.setText(prefs.getString("informational", getString(R.string.noinfo)));
|
||||
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
@@ -163,9 +165,6 @@ public class FragmentPersonal extends Fragment {
|
||||
}
|
||||
});
|
||||
|
||||
// pullToRefresh.setRefreshing(true);
|
||||
// new fetcher().execute();
|
||||
|
||||
pullToRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
|
||||
@Override
|
||||
public void onRefresh() {
|
||||
@@ -180,9 +179,9 @@ public class FragmentPersonal extends Fragment {
|
||||
|
||||
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";
|
||||
String newDateString, informational;
|
||||
String newDateString;
|
||||
String[] groupS, dateS, timeS, courseS, roomS, additionalS;
|
||||
boolean attempt = false, npe = false, emptyIcon;
|
||||
boolean attempt = false, npe = false;
|
||||
URL url;
|
||||
URLConnection connection;
|
||||
String modified;
|
||||
@@ -194,6 +193,7 @@ public class FragmentPersonal extends Fragment {
|
||||
ProgressBar progressBar;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(OLD_FORMAT);
|
||||
Date d;
|
||||
private ArrayList<String> informationalList = new ArrayList<>();
|
||||
|
||||
protected fetcher() {
|
||||
}
|
||||
@@ -214,16 +214,6 @@ public class FragmentPersonal extends Fragment {
|
||||
pCount = paragraphs.size();
|
||||
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];
|
||||
dateS = new String[count];
|
||||
timeS = new String[count];
|
||||
@@ -249,13 +239,23 @@ public class FragmentPersonal extends Fragment {
|
||||
additionalS[i] = cols.get(5).text();
|
||||
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);
|
||||
substViewModel.insert(subst);
|
||||
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) {
|
||||
npe = true;
|
||||
} catch (NullPointerException e1) {
|
||||
@@ -265,110 +265,48 @@ public class FragmentPersonal extends Fragment {
|
||||
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
|
||||
protected void onPostExecute(Void result) {
|
||||
try {
|
||||
if (attempt) {
|
||||
final Animation fadeOut = AnimationUtils.loadAnimation(getContext(), R.anim.fade_out);
|
||||
if (attempt) {
|
||||
final Animation fadeOut = AnimationUtils.loadAnimation(getContext(), R.anim.fade_out);
|
||||
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressBar.startAnimation(fadeOut);
|
||||
}
|
||||
}, 200);
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
progressBar.startAnimation(fadeOut);
|
||||
}
|
||||
}, 200);
|
||||
|
||||
fadeOut.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation arg0) {
|
||||
}
|
||||
fadeOut.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
public void onAnimationStart(Animation arg0) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation arg0) {
|
||||
}
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation arg0) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation arg0) {
|
||||
progressBar.setProgress(0);
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void onAnimationEnd(Animation arg0) {
|
||||
progressBar.setProgress(0);
|
||||
}
|
||||
});
|
||||
|
||||
sdf.applyPattern(NEW_FORMAT);
|
||||
newDateString = sdf.format(d);
|
||||
View contextView = getView().getRootView().findViewById(R.id.coordination);
|
||||
Snackbar snackbar = make(contextView, getText(R.string.lastupdated) + ": " + newDateString, Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null);
|
||||
snackbar.show();
|
||||
|
||||
pullToRefresh.setRefreshing(false);
|
||||
} else if (npe) {
|
||||
pullToRefresh.setRefreshing(false);
|
||||
View contextView = getView().getRootView().findViewById(R.id.coordination);
|
||||
Snackbar snackbar = make(contextView, getText(R.string.nointernet), Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null);
|
||||
snackbar.show();
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
sdf.applyPattern(NEW_FORMAT);
|
||||
newDateString = sdf.format(d);
|
||||
View contextView = getView().getRootView().findViewById(R.id.coordination);
|
||||
Snackbar snackbar = make(contextView, getText(R.string.lastupdated) + ": " + newDateString, Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null);
|
||||
snackbar.show();
|
||||
|
||||
pullToRefresh.setRefreshing(false);
|
||||
} else if (npe) {
|
||||
pullToRefresh.setRefreshing(false);
|
||||
View contextView = getView().getRootView().findViewById(R.id.coordination);
|
||||
Snackbar snackbar = make(contextView, getText(R.string.nointernet), Snackbar.LENGTH_LONG)
|
||||
.setAction("Action", null);
|
||||
snackbar.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -93,17 +92,7 @@ public class FragmentPlan extends Fragment {
|
||||
substViewModel.getAllSubst().observe(this, new Observer<List<Subst>>() {
|
||||
@Override
|
||||
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);
|
||||
|
||||
for (int i = 0; i < mAdapter.getItemCount(); i++) {
|
||||
|
||||
}
|
||||
|
||||
// recyclerView.setLayoutAnimation(animationIn);
|
||||
recyclerView.scheduleLayoutAnimation();
|
||||
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";
|
||||
String newDateString, informational;
|
||||
String[] groupS, dateS, timeS, courseS, roomS, additionalS;
|
||||
boolean attempt = false, npe = false, emptyIcon;
|
||||
boolean attempt = false, npe = false;
|
||||
URL url;
|
||||
URLConnection connection;
|
||||
String modified;
|
||||
@@ -193,7 +182,7 @@ public class FragmentPlan extends Fragment {
|
||||
additionalS[i] = cols.get(5).text();
|
||||
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);
|
||||
substViewModel.insert(subst);
|
||||
priority--;
|
||||
@@ -209,64 +198,6 @@ public class FragmentPlan extends Fragment {
|
||||
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
|
||||
protected void onPostExecute(Void result) {
|
||||
try {
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
package com.denizd.substitutionplan;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProviders;
|
||||
@@ -22,23 +17,12 @@ import android.text.TextWatcher;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.EditText;
|
||||
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.List;
|
||||
|
||||
import static com.google.android.material.snackbar.Snackbar.make;
|
||||
|
||||
public class FragmentSearch extends Fragment {
|
||||
|
||||
ConstraintLayout constraintLayout;
|
||||
@@ -119,12 +103,6 @@ public class FragmentSearch extends Fragment {
|
||||
if (substs.get(i).getGroup().toLowerCase().contains(searchfield.getText().toString().toLowerCase())) {
|
||||
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())) {
|
||||
search = true;
|
||||
}
|
||||
@@ -140,179 +118,7 @@ public class FragmentSearch extends Fragment {
|
||||
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.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.browser.customtabs.CustomTabsIntent;
|
||||
@@ -21,7 +18,6 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.TypedValue;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -38,17 +34,16 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.jaredrummler.android.device.DeviceName;
|
||||
|
||||
import org.w3c.dom.Text;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Random;
|
||||
|
||||
public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
CoordinatorLayout coordinatorLayout;
|
||||
private int cs = 7, i = 0;
|
||||
private String manufacturer, name, model;
|
||||
private String name, model;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -75,14 +70,14 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
builder.setToolbarColor(getResources().getColor(R.color.white));
|
||||
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 darkmode = getView().findViewById(R.id.switchDark);
|
||||
final Switch showinfo = getView().findViewById(R.id.switchHideInfo);
|
||||
final LinearLayout customiseColours = getView().findViewById(R.id.btnCustomiseColours);
|
||||
|
||||
final EditText txtClasses = getView().findViewById(R.id.txtClasses);
|
||||
final EditText txtCourses = getView().findViewById(R.id.txtCourses);
|
||||
final TextInputEditText txtClasses = getView().findViewById(R.id.txtClasses);
|
||||
final TextInputEditText txtCourses = getView().findViewById(R.id.txtCourses);
|
||||
final ImageButton helpClasses = getView().findViewById(R.id.chipHelpClasses);
|
||||
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 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() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -246,7 +236,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
} else {
|
||||
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);
|
||||
TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle);
|
||||
titleText.setText(R.string.customisecolor1);
|
||||
@@ -276,7 +265,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
} else {
|
||||
colourPickerBuilder = new AlertDialog.Builder(getContext(), R.style.AlertDialogCustomLight);
|
||||
}
|
||||
// colourPickerBuilder.setTitle(title);
|
||||
View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.empty_dialog, null);
|
||||
TextView titleText = dialogView.findViewById(R.id.empty_textviewtitle);
|
||||
titleText.setText(title);
|
||||
@@ -336,7 +324,6 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
colourCustomiserDialog.cancel();
|
||||
}
|
||||
});
|
||||
// alertDialog.setPositiveButton(R.string.finish, null);
|
||||
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() {
|
||||
@Override
|
||||
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);
|
||||
TextView title = dialogView.findViewById(R.id.textviewtitle);
|
||||
title.setText("Licenses");
|
||||
title.setText("Licences");
|
||||
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" +
|
||||
"\n • EasyPreferences © 2018 Mukesh Solanki, licensed under the MIT License" +
|
||||
"\n • jsoup HTML parser © 2009-2018 Jonathan Hedley, licensed under the open source MIT License" +
|
||||
"\n\nFont:\n • Manrope © 2018-2019 Michael Sharanda, licensed under the SIL Open Font License 1.1" +
|
||||
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 Licence" +
|
||||
"\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 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\nMarketing & Publishing:\n • Leon Becker\n • Alex Lick\n • Batuhan Özcan\n • Erich Kerkesner");
|
||||
alertDialog.setView(dialogView);
|
||||
@@ -758,8 +705,8 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
title.setText(R.string.dating);
|
||||
|
||||
Button datingBtn = dialogView.findViewById(R.id.dating_btn);
|
||||
final EditText boyT = dialogView.findViewById(R.id.dating_txt1);
|
||||
final EditText girlT = dialogView.findViewById(R.id.dating_txt2);
|
||||
final TextInputEditText boyT = dialogView.findViewById(R.id.dating_txt1);
|
||||
final TextInputEditText girlT = dialogView.findViewById(R.id.dating_txt2);
|
||||
final CheckBox boy = dialogView.findViewById(R.id.cb1);
|
||||
final CheckBox girl = dialogView.findViewById(R.id.cb2);
|
||||
final TextView percentage = dialogView.findViewById(R.id.dating_txtp);
|
||||
@@ -769,10 +716,10 @@ public class FragmentSettings extends Fragment implements View.OnClickListener {
|
||||
try {
|
||||
double boyP = 0, girlP = 0, perc = 0;
|
||||
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()) {
|
||||
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++) {
|
||||
boyP++;
|
||||
|
||||
@@ -43,6 +43,7 @@ import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -57,7 +58,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
BottomSheetBehavior bottomSheetBehaviour;
|
||||
private String manufacturer;
|
||||
private String marketName;
|
||||
|
||||
protected void job() {
|
||||
ComponentName componentName = new ComponentName(this, ScheduledJobService.class);
|
||||
@@ -77,7 +77,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
final SharedPreferences.Editor edit = prefs.edit();
|
||||
final Intent firstTime = new Intent(this, FirstTime.class);
|
||||
if (prefs.getBoolean("firstTime", true)) {
|
||||
// if (true) {
|
||||
startActivity(firstTime);
|
||||
finish();
|
||||
}
|
||||
@@ -104,9 +103,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
Window window = this.getWindow();
|
||||
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 Chip chip = findViewById(R.id.chip);
|
||||
@@ -160,19 +156,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO Huawei dialog
|
||||
|
||||
if (prefs.getBoolean("huaweiDeviceDialog", true)) {
|
||||
// if (true) {
|
||||
DeviceName.with(this).request(new DeviceName.Callback() {
|
||||
@Override
|
||||
public void onFinished(DeviceName.DeviceInfo info, Exception error) {
|
||||
manufacturer = info.manufacturer;
|
||||
marketName = info.marketName;
|
||||
if (manufacturer.contains("Huawei") ||
|
||||
manufacturer.contains("Honor") ||
|
||||
manufacturer.contains("Xiaomi")) {
|
||||
// if (true) {
|
||||
|
||||
AlertDialog.Builder alertDialog;
|
||||
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);
|
||||
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.show();
|
||||
|
||||
@@ -220,31 +202,36 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
|
||||
ImageView iconinfo = findViewById(R.id.info_icon);
|
||||
|
||||
// theme change
|
||||
if (prefs.getInt("themeInt", 0) == 0) {
|
||||
setTheme(R.style.AppTheme0);
|
||||
|
||||
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);
|
||||
toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.white));
|
||||
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.white));
|
||||
toolbar.setBackgroundColor(ContextCompat.getColor(this, R.color.darkwhite));
|
||||
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.darkwhite));
|
||||
} else {
|
||||
window.setStatusBarColor(ContextCompat.getColor(this, R.color.black));
|
||||
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.black));
|
||||
}
|
||||
|
||||
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.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));
|
||||
bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lessdark));
|
||||
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);
|
||||
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);
|
||||
}
|
||||
if (prefs.getInt("themeInt", 0) == 1) {
|
||||
@@ -252,8 +239,10 @@ public class MainActivity extends AppCompatActivity {
|
||||
window.setStatusBarColor(ContextCompat.getColor(this, R.color.background));
|
||||
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
|
||||
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.setItemIconTintList(ContextCompat.getColorStateList(this, R.color.tintlist_dark));
|
||||
bottomNav.setItemTextColor(ContextCompat.getColorStateList(this, R.color.tintlist_dark));
|
||||
window.setNavigationBarColor(getResources().getColor(R.color.background));
|
||||
chip.setChipBackgroundColor(getResources().getColorStateList(R.color.chip_state_list_dark));
|
||||
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));
|
||||
bottomSheetText.setTextColor(ContextCompat.getColor(this, R.color.lightgrey));
|
||||
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);
|
||||
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 (true) {
|
||||
final Handler bsbIn = new Handler();
|
||||
bsbIn.postDelayed(new Runnable() {
|
||||
@Override
|
||||
@@ -449,10 +438,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
switcher = true;
|
||||
}
|
||||
break;
|
||||
// case R.id.search:
|
||||
// fragment = new FragmentSearch();
|
||||
// toolbarTxt.setText(getString(R.string.search));
|
||||
// break;
|
||||
case R.id.menu:
|
||||
if (getCurrentFragment().toString().contains("FragmentFood")) {
|
||||
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.SharedPreferences;
|
||||
import android.graphics.Color;
|
||||
import android.media.RingtoneManager;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.widget.RemoteViews;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.madapps.prefrences.EasyPrefrences;
|
||||
|
||||
@@ -30,8 +30,6 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ScheduledJobService extends JobService {
|
||||
|
||||
@@ -50,41 +48,34 @@ public class ScheduledJobService extends JobService {
|
||||
final SharedPreferences.Editor edit = prefs.edit();
|
||||
|
||||
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() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (jobCancelled) {
|
||||
return;
|
||||
}
|
||||
if (prefs.getBoolean("notif", false)) {
|
||||
edit.putInt("notificationTestNumberDev", prefs.getInt("notificationTestNumberDev", 0) + 1);
|
||||
new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (jobCancelled) {
|
||||
return;
|
||||
}
|
||||
if (prefs.getBoolean("notif", false)) {
|
||||
edit.putInt("notificationTestNumberDev", prefs.getInt("notificationTestNumberDev", 0) + 1);
|
||||
edit.apply();
|
||||
URL url;
|
||||
URLConnection connection = null;
|
||||
try {
|
||||
url = new URL("https://djd4rkn355.github.io/subst");
|
||||
connection = url.openConnection();
|
||||
} catch (MalformedURLException e) {}
|
||||
catch (IOException e) {}
|
||||
try {
|
||||
if ((!connection.getHeaderField("Last-Modified").equals(prefs.getString("time", "")))) {
|
||||
new fetcher(context).execute();
|
||||
edit.putString("time", connection.getHeaderField("Last-Modified"));
|
||||
edit.apply();
|
||||
URL url;
|
||||
URLConnection connection = null;
|
||||
try {
|
||||
url = new URL("https://djd4rkn355.github.io/subst");
|
||||
connection = url.openConnection();
|
||||
} catch (MalformedURLException e) {}
|
||||
catch (IOException e) {}
|
||||
try {
|
||||
if ((!connection.getHeaderField("Last-Modified").equals(prefs.getString("time", "")))) {
|
||||
// if (true) {
|
||||
new fetcher(context).execute();
|
||||
edit.putString("time", connection.getHeaderField("Last-Modified"));
|
||||
edit.apply();
|
||||
}
|
||||
} catch (NullPointerException e1) {
|
||||
}
|
||||
}
|
||||
jobFinished(params, false);
|
||||
} catch (NullPointerException e1) {
|
||||
}
|
||||
}).start();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
jobFinished(params, false);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -95,18 +86,16 @@ public class ScheduledJobService extends JobService {
|
||||
|
||||
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;
|
||||
String notifText = "", foodInfo = "", informational = "";
|
||||
String notifText = "", informational = "";
|
||||
String[] groupS, dateS, timeS, courseS, roomS, additionalS;
|
||||
boolean attempt = false, emptyIcon;
|
||||
URL url;
|
||||
URLConnection connection;
|
||||
String modified;
|
||||
Elements rows, paragraphs;
|
||||
Elements[] paragraphsFood = new Elements[2];
|
||||
Elements foodElements;
|
||||
Element[] dateFood = new Element[2], blockFood = new Element[2];
|
||||
Document doc, docFood;
|
||||
NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
String channelId = "general";
|
||||
@@ -228,7 +217,7 @@ public class ScheduledJobService extends JobService {
|
||||
roomS[i] = cols.get(4).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);
|
||||
priority--;
|
||||
substViewModel.insert(subst);
|
||||
@@ -267,97 +256,34 @@ public class ScheduledJobService extends JobService {
|
||||
notificationLayout.setTextViewText(R.id.notification_title, getString(R.string.subst));
|
||||
notificationLayout.setTextViewText(R.id.notification_textview, notifText);
|
||||
|
||||
if (!notifText.isEmpty()) {
|
||||
Notification notification = null;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
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())
|
||||
.setCustomContentView(notificationLayout)
|
||||
.setSmallIcon(R.drawable.ic_avh)
|
||||
.setChannelId(channelId)
|
||||
.setContentIntent(openAppPending)
|
||||
.setAutoCancel(true)
|
||||
.build();
|
||||
} else {
|
||||
notification = new NotificationCompat.Builder(mContext)
|
||||
// .setContentTitle(getString(R.string.subst))
|
||||
// .setStyle(new NotificationCompat.BigTextStyle()
|
||||
// .bigText(notifText))
|
||||
.setStyle(new NotificationCompat.DecoratedCustomViewStyle())
|
||||
.setCustomContentView(notificationLayout)
|
||||
.setSmallIcon(R.drawable.ic_avh)
|
||||
.setContentIntent(openAppPending)
|
||||
.setAutoCancel(true)
|
||||
.build();
|
||||
}
|
||||
manager.notify(1, notification);
|
||||
if (!notifText.isEmpty()) {
|
||||
Notification notification;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
notification = new NotificationCompat.Builder(mContext) // TODO switch out the deprecated notification delivery method
|
||||
.setStyle(new NotificationCompat.DecoratedCustomViewStyle())
|
||||
.setCustomContentView(notificationLayout)
|
||||
.setSmallIcon(R.drawable.ic_avh)
|
||||
.setChannelId(channelId)
|
||||
.setContentIntent(openAppPending)
|
||||
.setAutoCancel(true)
|
||||
.build();
|
||||
} else {
|
||||
notification = new NotificationCompat.Builder(mContext)
|
||||
.setStyle(new NotificationCompat.DecoratedCustomViewStyle())
|
||||
.setCustomContentView(notificationLayout)
|
||||
.setSmallIcon(R.drawable.ic_avh)
|
||||
.setContentIntent(openAppPending)
|
||||
.setAutoCancel(true)
|
||||
.build();
|
||||
}
|
||||
notification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
|
||||
manager.notify(1, notification);
|
||||
}
|
||||
|
||||
}
|
||||
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
|
||||
protected void onPostExecute(Void result) {}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.denizd.substitutionplan;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.Database;
|
||||
import androidx.room.Room;
|
||||
import androidx.room.RoomDatabase;
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase;
|
||||
|
||||
@Database(entities = {Subst.class}, version = 2, exportSchema = false)
|
||||
public abstract class SubstDatabase extends RoomDatabase {
|
||||
@@ -26,27 +22,4 @@ public abstract class SubstDatabase extends RoomDatabase {
|
||||
}
|
||||
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;
|
||||
|
||||
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" };
|
||||
|
||||
}
|
||||
|
||||
@@ -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"?>
|
||||
|
||||
<!-- 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">
|
||||
|
||||
<!-- The background color, preferably the same as your normal theme -->
|
||||
<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"
|
||||
android:gravity="center"
|
||||
android:scaleType="centerInside">
|
||||
|
||||
@@ -90,12 +90,14 @@
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
app:elevation="0dp"
|
||||
app:itemIconTint="@color/bottom_nav_color_avhblue"
|
||||
app:itemTextColor="@color/bottom_nav_color_avhblue"
|
||||
app:layout_anchor="@+id/bottom_sheet"
|
||||
android:layout_gravity="bottom"
|
||||
app:menu="@menu/nav_items"/>
|
||||
|
||||
|
||||
<!-- app:itemIconTint="@drawable/tintlist_light"-->
|
||||
<!-- app:itemTextColor="@drawable/tintlist_light"-->
|
||||
|
||||
<View
|
||||
android:id="@+id/bottom_nav_divider"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -22,21 +22,36 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bottom_sheet_header"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="top|start"
|
||||
android:text="@string/information"
|
||||
android:textSize="16sp"/>
|
||||
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
|
||||
android:id="@+id/bottom_sheet_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:gravity="top|start"
|
||||
android:text="@string/information"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bottom_sheet_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_margin="16dp"
|
||||
android:gravity="top|start"
|
||||
android:text="@string/noinfo"
|
||||
android:textSize="12sp"/>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorBackground">
|
||||
@@ -10,7 +9,8 @@
|
||||
android:id="@+id/nsvsettings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -32,6 +32,8 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/txtLayoutName"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="?attr/colorAccent"
|
||||
app:boxStrokeWidth="2dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
@@ -44,25 +46,18 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtPersonalise"
|
||||
android:importantForAutofill="no">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/txtName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:ems="10"
|
||||
android:gravity="start"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="textStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:textColor="?attr/colorText"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="14sp"
|
||||
android:theme="@style/EditTextTheme" />
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -215,6 +210,8 @@
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/txtLayoutClasses"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="?attr/colorAccent"
|
||||
app:boxStrokeWidth="2dp"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
@@ -227,24 +224,18 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtFilter"
|
||||
android:importantForAutofill="no">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/txtClasses"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:ems="10"
|
||||
android:gravity="start"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="textStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:textColor="?attr/colorText"
|
||||
android:textSize="14sp"
|
||||
android:theme="@style/EditTextTheme" />
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
@@ -265,34 +256,29 @@
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:hint="@string/courses"
|
||||
android:importantForAutofill="no"
|
||||
android:textColorHint="?attr/colorHint"
|
||||
app:boxStrokeColor="?attr/colorAccent"
|
||||
app:boxStrokeWidth="2dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/chipHelpCourses"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtLayoutClasses"
|
||||
android:importantForAutofill="no">
|
||||
app:layout_constraintStart_toStartOf="@+id/txtLayoutClasses"
|
||||
app:layout_constraintTop_toBottomOf="@+id/txtLayoutClasses">
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/txtCourses"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:animateLayoutChanges="true"
|
||||
android:ems="10"
|
||||
android:gravity="start"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="textStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat"
|
||||
android:textColor="?attr/colorText"
|
||||
android:textSize="14sp"
|
||||
android:theme="@style/EditTextTheme" />
|
||||
android:textSize="14sp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<TextView
|
||||
@@ -40,16 +42,28 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dating_txt1"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="@color/datingPink"
|
||||
app:boxStrokeWidth="2dp"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="7"
|
||||
android:backgroundTint="?attr/colorText"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/boy"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
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
|
||||
android:id="@+id/cb1"
|
||||
@@ -66,16 +80,28 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dating_txt2"
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
app:boxStrokeColor="@color/datingPink"
|
||||
app:boxStrokeWidth="2dp"
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="7"
|
||||
android:backgroundTint="?attr/colorText"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/girl"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
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
|
||||
android:id="@+id/cb2"
|
||||
@@ -97,10 +123,11 @@
|
||||
android:layout_width="0px"
|
||||
android:layout_weight="5"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/datingPink"
|
||||
android:text="@string/calculate"
|
||||
android:textColor="@color/white"
|
||||
android:layout_gravity="start|center_vertical"/>
|
||||
android:textColor="@color/datingPink"
|
||||
app:strokeColor="@color/datingPink"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dating_txtp"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<TextView
|
||||
@@ -36,22 +38,26 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnResetLaunch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/accent"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="?attr/colorAccent"
|
||||
app:strokeColor="?attr/colorAccent"
|
||||
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
|
||||
android:id="@+id/btnResetNotif"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="@color/accent"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="?attr/colorAccent"
|
||||
app:strokeColor="?attr/colorAccent"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="Reset notification counter"/>
|
||||
android:text="Reset notification counter"
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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">
|
||||
|
||||
<TextView
|
||||
@@ -34,19 +36,37 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="?attr/colorText"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/dialog_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:textColor="?attr/colorText"/>
|
||||
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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?attr/colorText"
|
||||
android:ems="10"
|
||||
android:imeOptions="flagNoExtractUi"
|
||||
android:inputType="textNoSuggestions"
|
||||
android:singleLine="true"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/dialog_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:backgroundTint="?attr/colorAccent"
|
||||
android:textColor="?attr/colorAccent"
|
||||
android:text="@string/positivebutton"
|
||||
android:textColor="@color/white"/>
|
||||
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
|
||||
app:strokeColor="?attr/colorAccent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
android:id="@+id/linear_food"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layoutAnimation="@anim/layout_animation_fall_down">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
android:layoutAnimation="@anim/layout_animation_fall_down"
|
||||
android:scrollbars="vertical"/>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
@@ -53,7 +53,8 @@
|
||||
android:id="@+id/linearRecycler"
|
||||
android:layout_width="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>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
android:theme="@style/EditTextTheme"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -11,11 +11,6 @@
|
||||
android:icon="@drawable/ic_idea"
|
||||
android:title="@string/personal"
|
||||
android:enabled="true"/>
|
||||
<!--<item-->
|
||||
<!--android:id="@+id/search"-->
|
||||
<!--android:icon="@drawable/ic_magnifying_glass"-->
|
||||
<!--android:title="@string/search"-->
|
||||
<!--android:enabled="true"/>-->
|
||||
<item
|
||||
android:id="@+id/menu"
|
||||
android:icon="@drawable/ic_tomato"
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="background">#1B1B1B</color>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<color name="background">#121212</color>
|
||||
<color name="colorChipLight">#e0e0e0</color>
|
||||
<color name="colorChipDark">#424242</color>
|
||||
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="accent">#448aff</color>
|
||||
<color name="dark">#1B1B1B</color>
|
||||
<color name="lessdark">#212121</color>
|
||||
<color name="lightgrey">#e0e0e0</color>
|
||||
<color name="accentPastel">#64b5f6</color>
|
||||
<color name="dark">#121212</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="darkwhite">#eeeeee</color>
|
||||
<color name="lightwhite">#f5f5f5</color>
|
||||
|
||||
<color name="datingPink">#d81b60</color>
|
||||
|
||||
<color name="hint">#9e9e9e</color>
|
||||
@@ -41,5 +49,7 @@
|
||||
<color name="neonyellow">#FFEA00</color>
|
||||
<color name="neonorange">#FF3D00</color>
|
||||
|
||||
<color name="mtrl_textinput_default_box_stroke_color" tools:override="true">#757575</color>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -147,15 +147,4 @@
|
||||
<string name="showinfo">Show info tab in navigation bar</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>
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
<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">
|
||||
<item name="colorControlHighlight">#448aff</item>
|
||||
</style>
|
||||
@@ -24,8 +13,8 @@
|
||||
<item name="colorPrimary">#448aff</item>
|
||||
<item name="colorPrimaryDark">#FFFFFF</item>
|
||||
<item name="colorAccent">#448aff</item>
|
||||
<item name="colorBackground">#FFFFFF</item>
|
||||
<item name="colorBackgroundCard">#FFFFFF</item>
|
||||
<item name="colorBackground">#eeeeee</item>
|
||||
<item name="colorBackgroundCard">#f5f5f5</item>
|
||||
<item name="colorText">#212121</item>
|
||||
<item name="colorHintLight">#212121</item>
|
||||
<item name="colorHint">#9e9e9e</item>
|
||||
@@ -37,302 +26,31 @@
|
||||
</style>
|
||||
|
||||
<style name="AppTheme0Dark" parent="Theme.MaterialComponents.Light.DarkActionBar">
|
||||
<item name="colorPrimary">#448aff</item>
|
||||
<item name="colorPrimaryDark">#1B1B1B</item>
|
||||
<item name="colorAccent">#448aff</item>
|
||||
<item name="colorBackground">#1B1B1B</item>
|
||||
<item name="colorBackgroundCard">#212121</item>
|
||||
<item name="colorPrimary">#64b5f6</item>
|
||||
<item name="colorPrimaryDark">#121212</item>
|
||||
<item name="colorAccent">#64b5f6</item>
|
||||
<item name="colorBackground">#121212</item>
|
||||
<item name="colorBackgroundCard">#1E1E1E</item>
|
||||
<item name="colorText">#e0e0e0</item>
|
||||
<item name="colorHintLight">#e0e0e0</item>
|
||||
<item name="colorHint">#9e9e9e</item>
|
||||
<item name="colorHintDark">#757575</item>
|
||||
<item name="android:fontFamily">@font/manrope_medium</item>
|
||||
<item name="referenceTextColor">?attr/colorHint</item>
|
||||
<item name="colorChip">#212121</item>
|
||||
<item name="colorChip">#1E1E1E</item>
|
||||
<item name="android:colorEdgeEffect">#9e9e9e</item>
|
||||
</style>
|
||||
|
||||
<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>
|
||||
</style>
|
||||
|
||||
<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>
|
||||
</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">
|
||||
<item name="colorControlNormal">#000000</item>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user