Merge branch 'develop' into routeFragmentDetail

This commit is contained in:
Sem van der Hoeven
2021-01-12 14:57:28 +01:00
17 changed files with 78 additions and 59 deletions

View File

@@ -53,7 +53,8 @@ public class CouponFragment extends Fragment {
this.backButton = view.findViewById(R.id.coupon_back_button); this.backButton = view.findViewById(R.id.coupon_back_button);
this.backButton.setOnClickListener(v -> { this.backButton.setOnClickListener(v -> {
StatisticFragment statisticFragment = new StatisticFragment(); StatisticFragment statisticFragment = new StatisticFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit();
}); });
this.couponRecyclerView.setLayoutManager(this.layoutManager); this.couponRecyclerView.setLayoutManager(this.layoutManager);

View File

@@ -91,7 +91,8 @@ public class HomeFragment extends Fragment implements LocationListener {
this.imageButton = view.findViewById(R.id.location_list_button); this.imageButton = view.findViewById(R.id.location_list_button);
this.imageButton.setOnClickListener(v -> { this.imageButton.setOnClickListener(v -> {
LocationFragment locationFragment = new LocationFragment(); LocationFragment locationFragment = new LocationFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit();
}); });
// set up the route stop button // set up the route stop button

View File

@@ -12,7 +12,6 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.a1.nextlocation.R; import com.a1.nextlocation.R;
import com.a1.nextlocation.data.Data; import com.a1.nextlocation.data.Data;
@@ -50,20 +49,20 @@ public class LocationDetailFragment extends Fragment {
this.titelText.setText(location.getName()); this.titelText.setText(location.getName());
double currentDistanceToLocation = 0.0; double currentDistanceToLocation = 0.0;
if(Data.INSTANCE.getLocation() != null){ if (Data.INSTANCE.getLocation() != null) {
currentDistanceToLocation = Location.getDistance(Data.INSTANCE.getLocation().getLatitude(), Data.INSTANCE.getLocation().getLongitude(), this.location.getLat(), this.location.getLong()); currentDistanceToLocation = Location.getDistance(Data.INSTANCE.getLocation().getLatitude(), Data.INSTANCE.getLocation().getLongitude(), this.location.getLat(), this.location.getLong());
} }
//Adds distance text from the current distance of the user to the opened location //Adds distance text from the current distance of the user to the opened location
String detailText; String detailText;
if(getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE).getBoolean("imperialSwitch", false)){ if (getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE).getBoolean("imperialSwitch", false)) {
if(currentDistanceToLocation > 1609) if (currentDistanceToLocation > 1609)
detailText = location.getDescription() + String.format("%.3f",currentDistanceToLocation * 0.000621371192) + "mi"; detailText = location.getDescription() + String.format("%.3f", currentDistanceToLocation * 0.000621371192) + "mi";
else else
detailText = location.getDescription() + String.format("%.2f",currentDistanceToLocation * 1.0936133) + "yd"; detailText = location.getDescription() + String.format("%.2f", currentDistanceToLocation * 1.0936133) + "yd";
} else { } else {
if(currentDistanceToLocation > 1000) if (currentDistanceToLocation > 1000)
detailText = location.getDescription() + String.format("%.3f",currentDistanceToLocation / 1000) + "km"; detailText = location.getDescription() + String.format("%.3f", currentDistanceToLocation / 1000) + "km";
else else
detailText = location.getDescription() + currentDistanceToLocation + "m"; detailText = location.getDescription() + currentDistanceToLocation + "m";
} }
@@ -74,7 +73,8 @@ public class LocationDetailFragment extends Fragment {
this.backButton = view.findViewById(R.id.detail_location_back_button); this.backButton = view.findViewById(R.id.detail_location_back_button);
this.backButton.setOnClickListener(v -> { this.backButton.setOnClickListener(v -> {
LocationFragment locationFragment = new LocationFragment(); LocationFragment locationFragment = new LocationFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationFragment).addToBackStack(null).commit();
}); });
//Logs the location //Logs the location

View File

@@ -43,7 +43,8 @@ public class LocationFragment extends Fragment {
this.backButton = view.findViewById(R.id.location_back_button); this.backButton = view.findViewById(R.id.location_back_button);
this.backButton.setOnClickListener(v -> { this.backButton.setOnClickListener(v -> {
HomeFragment homeFragment = new HomeFragment(); HomeFragment homeFragment = new HomeFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
}); });
//Loads the location list //Loads the location list
@@ -58,7 +59,8 @@ public class LocationFragment extends Fragment {
//Gives the clicked location to the adapter //Gives the clicked location to the adapter
locationBundle.putParcelable("location", this.locationList.get(clickedPosition)); locationBundle.putParcelable("location", this.locationList.get(clickedPosition));
locationDetailFragment.setArguments(locationBundle); locationDetailFragment.setArguments(locationBundle);
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationDetailFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationDetailFragment).addToBackStack(null).commit();
}); });
this.locationRecyclerView.setLayoutManager(this.layoutManager); this.locationRecyclerView.setLayoutManager(this.layoutManager);

View File

@@ -14,7 +14,6 @@ import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.a1.nextlocation.R; import com.a1.nextlocation.R;
import com.a1.nextlocation.data.Location; import com.a1.nextlocation.data.Location;
@@ -64,10 +63,10 @@ public class RouteDetailFragment extends Fragment {
TextView routeDetailText = view.findViewById(R.id.route_detail_tekst); TextView routeDetailText = view.findViewById(R.id.route_detail_tekst);
StringBuilder locations = new StringBuilder(); StringBuilder locations = new StringBuilder();
for(Location location : this.route.getLocations()){ for (Location location : this.route.getLocations()) {
locations.append("<br>•").append(location.getName()); locations.append("<br>•").append(location.getName());
} }
String detailText = this.route.getDescription() + "<br><br><b>" + getResources().getString(R.string.following_locations) + "</b>" + locations + "<br><br><b>" + getResources().getString(R.string.start_location) + ": </b>" + route.getLocations().get(0).getName() + "<br>" + "<b>" + getResources().getString(R.string.end_location) + ": </b>" + route.getLocations().get(route.getLocations().size()-1).getName(); String detailText = this.route.getDescription() + "<br><br><b>" + getResources().getString(R.string.following_locations) + "</b>" + locations + "<br><br><b>" + getResources().getString(R.string.start_location) + ": </b>" + route.getLocations().get(0).getName() + "<br>" + "<b>" + getResources().getString(R.string.end_location) + ": </b>" + route.getLocations().get(route.getLocations().size() - 1).getName();
routeDetailText.setText(Html.fromHtml(detailText)); routeDetailText.setText(Html.fromHtml(detailText));
//sets the text of the totaldistance //sets the text of the totaldistance
@@ -80,7 +79,8 @@ public class RouteDetailFragment extends Fragment {
ImageButton backButton = view.findViewById(R.id.route_detail_back_button); ImageButton backButton = view.findViewById(R.id.route_detail_back_button);
backButton.setOnClickListener(v -> { backButton.setOnClickListener(v -> {
RouteFragment routeFragment = new RouteFragment(); RouteFragment routeFragment = new RouteFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, routeFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, routeFragment).addToBackStack(null).commit();
}); });
Button startButton = view.findViewById(R.id.start_route_button); Button startButton = view.findViewById(R.id.start_route_button);

View File

@@ -9,7 +9,6 @@ import android.widget.ImageButton;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@@ -49,13 +48,15 @@ public class RouteFragment extends Fragment {
Bundle routeBundle = new Bundle(); Bundle routeBundle = new Bundle();
routeBundle.putParcelable("route", this.routeList.get(clickedPosition)); routeBundle.putParcelable("route", this.routeList.get(clickedPosition));
routeDetailFragment.setArguments(routeBundle); routeDetailFragment.setArguments(routeBundle);
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, routeDetailFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, routeDetailFragment).addToBackStack(null).commit();
}); });
ImageButton backButton = view.findViewById(R.id.route_back_button); ImageButton backButton = view.findViewById(R.id.route_back_button);
backButton.setOnClickListener(v -> { backButton.setOnClickListener(v -> {
HomeFragment homeFragment = new HomeFragment(); HomeFragment homeFragment = new HomeFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
}); });
routeRecyclerView.setLayoutManager(layoutManager); routeRecyclerView.setLayoutManager(layoutManager);

View File

@@ -5,7 +5,6 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@@ -17,10 +16,8 @@ import android.widget.Spinner;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import com.a1.nextlocation.MainActivity;
import com.a1.nextlocation.R; import com.a1.nextlocation.R;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@@ -66,7 +63,8 @@ public class SettingsFragment extends Fragment {
ImageView backButton = view.findViewById(R.id.settings_back_button); ImageView backButton = view.findViewById(R.id.settings_back_button);
backButton.setOnClickListener(v -> { backButton.setOnClickListener(v -> {
HomeFragment homeFragment = new HomeFragment(); HomeFragment homeFragment = new HomeFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
}); });
SharedPreferences sharedPreferences = getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE); SharedPreferences sharedPreferences = getContext().getSharedPreferences("Settings", Context.MODE_PRIVATE);
@@ -87,24 +85,25 @@ public class SettingsFragment extends Fragment {
fontSwitch.setChecked(sharedPreferences.getBoolean("fontSwitch", false)); fontSwitch.setChecked(sharedPreferences.getBoolean("fontSwitch", false));
//Initial check to see what setting was last chosen //Initial check to see what setting was last chosen
if (fontSwitch.isChecked()){ if (fontSwitch.isChecked()) {
requireActivity().setTheme(R.style.Theme_NextLocationBig); requireActivity().setTheme(R.style.Theme_NextLocationBig);
}else if (!fontSwitch.isChecked()){ } else if (!fontSwitch.isChecked()) {
requireActivity().setTheme(R.style.Theme_NextLocation); requireActivity().setTheme(R.style.Theme_NextLocation);
} }
//Changes the font settings depending on the state of the toggle //Changes the font settings depending on the state of the toggle
fontSwitch.setOnClickListener(view1 -> { fontSwitch.setOnClickListener(view1 -> {
if(fontSwitch.isChecked()) if (fontSwitch.isChecked()) {
{
requireActivity().setTheme(R.style.Theme_NextLocationBig); requireActivity().setTheme(R.style.Theme_NextLocationBig);
getActivity().recreate();
} }
if(!fontSwitch.isChecked()) if(!fontSwitch.isChecked())
{ {
requireActivity().setTheme(R.style.Theme_NextLocation);; requireActivity().setTheme(R.style.Theme_NextLocation);
getActivity().recreate();
} }
editor.putBoolean("fontSwitch",fontSwitch.isChecked()); editor.putBoolean("fontSwitch", fontSwitch.isChecked());
editor.apply(); editor.apply();
editor.commit(); editor.commit();
}); });
@@ -117,12 +116,12 @@ public class SettingsFragment extends Fragment {
editor.apply(); editor.apply();
editor.commit(); editor.commit();
if (colorBlindMode.isChecked()){ if (colorBlindMode.isChecked()) {
requireActivity().setTheme(R.style.Theme_NextLocation); requireActivity().setTheme(R.style.Theme_NextLocation);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
getActivity().recreate(); getActivity().recreate();
System.out.println("AAN"); System.out.println("AAN");
}else if (!colorBlindMode.isChecked()){ } else if (!colorBlindMode.isChecked()) {
requireActivity().setTheme(R.style.Theme_NextLocation); requireActivity().setTheme(R.style.Theme_NextLocation);
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
getActivity().recreate(); getActivity().recreate();

View File

@@ -58,21 +58,24 @@ public class StatisticFragment extends Fragment {
ImageView backButton = view.findViewById(R.id.statistics_back_button); ImageView backButton = view.findViewById(R.id.statistics_back_button);
backButton.setOnClickListener(v -> { backButton.setOnClickListener(v -> {
HomeFragment homeFragment = new HomeFragment(); HomeFragment homeFragment = new HomeFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
}); });
//Initialises the coupon button //Initialises the coupon button
ImageView couponButton = view.findViewById(R.id.coupon_button); ImageView couponButton = view.findViewById(R.id.coupon_button);
couponButton.setOnClickListener(v -> { couponButton.setOnClickListener(v -> {
CouponFragment couponFragment = new CouponFragment(); CouponFragment couponFragment = new CouponFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit();
}); });
//Makes the constraintlayout clickable and opens the same layout as the coupon button //Makes the constraintlayout clickable and opens the same layout as the coupon button
ConstraintLayout constraintLayout = view.findViewById(R.id.Box4); ConstraintLayout constraintLayout = view.findViewById(R.id.Box4);
constraintLayout.setOnClickListener(v -> { constraintLayout.setOnClickListener(v -> {
CouponFragment couponFragment = new CouponFragment(); CouponFragment couponFragment = new CouponFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit(); if (getActivity() != null)
getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit();
}); });
return view; return view;
} }

View File

@@ -5,6 +5,15 @@
android:id="@+id/couponItem" android:id="@+id/couponItem"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<View
android:layout_width="0dp"
android:layout_height="74dp"
app:layout_constraintTop_toTopOf="@+id/name_box"
app:layout_constraintBottom_toBottomOf="@+id/name_box"
app:layout_constraintLeft_toLeftOf="@+id/name_box"
app:layout_constraintRight_toRightOf="@+id/name_box"
android:background="@color/secondaryColour"/>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/name_box" android:id="@+id/name_box"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -26,7 +26,6 @@
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="12dp" android:layout_marginTop="12dp"
android:background="@drawable/ic_back_button_24" android:background="@drawable/ic_back_button_24"
android:backgroundTint="@color/buttonColour"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@@ -15,8 +15,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:backgroundTint="@color/primaryColour" android:background="@drawable/ic_back_button_24"
android:src="@drawable/ic_back_button_24"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@@ -267,8 +267,6 @@
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:background="@drawable/ic_back_button_24" android:background="@drawable/ic_back_button_24"
android:backgroundTint="@color/buttonColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@@ -22,24 +22,28 @@
android:paddingVertical="10dp"/> android:paddingVertical="10dp"/>
<ScrollView <ScrollView
app:layout_constraintStart_toStartOf="parent" android:id="@+id/scrollView2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/helpPopTitle"
android:layout_width="300dp" android:layout_width="300dp"
android:layout_height="450dp"> android:layout_height="400dp"
android:layout_marginHorizontal="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/helpPopTitle"
app:layout_constraintBottom_toTopOf="@id/help_ok_button"
>
<TextView <TextView
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/helpPopTitle"
android:layout_width="280dp" android:layout_width="280dp"
android:layout_height="430dp" android:layout_height="430dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="10dp"
android:text="@string/help_discription" android:text="@string/help_discription"
android:textColor="@color/secondaryColour" android:textColor="@color/secondaryColour"
android:layout_marginStart="10dp" app:layout_constraintEnd_toEndOf="parent"
android:layout_marginEnd="10dp" app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="10dp" app:layout_constraintTop_toBottomOf="@id/helpPopTitle" />
android:layout_marginBottom="10dp"/>
</ScrollView> </ScrollView>
@@ -48,11 +52,13 @@
android:id="@+id/help_ok_button" android:id="@+id/help_ok_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:backgroundTint="@color/buttonColour" android:backgroundTint="@color/buttonColour"
android:textColor="@color/primaryColour"
android:text="ok" android:text="ok"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/helpPopTitle" /> app:layout_constraintTop_toBottomOf="@id/scrollView2"
app:layout_constraintStart_toStartOf="parent" />

View File

@@ -2,7 +2,7 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/primaryColour</item> <item name="colorPrimary">@color/white</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/secondaryColour</item> <item name="colorSecondary">@color/secondaryColour</item>
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
@@ -12,8 +12,8 @@
</style> </style>
<style name="Theme.Switches" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.Switches" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorControlActivated">@color/buttonColour</item> <item name="colorControlActivated">@color/secondaryColour</item>
<item name="colorSwitchThumbNormal">@color/primaryColour</item> <item name="colorSwitchThumbNormal">@color/buttonColourCB</item>
</style> </style>
<style name="Theme.NextLocationBig" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.NextLocationBig" parent="Theme.MaterialComponents.DayNight.NoActionBar">

View File

@@ -26,7 +26,7 @@
<string name="Dutch">Nederlands</string> <string name="Dutch">Nederlands</string>
<string name="Chinese">Chinees</string> <string name="Chinese">Chinees</string>
<string name="help">HELP</string> <string name="help">HELP</string>
<string name="help_discription">Onderaan het scherm zijn verschillende knoppen te zien. Deze knoppen hebben de volgende functies: \n\nLocaties: toont een lijst met alle locaties die bezocht kunnen worden. Elke locatie wordt kort beschreven. \n\nRoutes: Toont een lijst met alle routes die gelopen kunnen worden. Van elke route wordt een omschrijving gegeven. \n\nStatistieken: Toont persoonlijke statistieken. \n\nInstellingen: Hier kunnen app-instellingen worden aangepast naar eigen voorkeur. \n\nEen locatie ingedrukt houden laat extra informatie zien over de gekozen locatie</string> <string name="help_discription">Onderaan het scherm zijn verschillende knoppen te zien. Deze knoppen hebben de volgende functies: \n\nLocaties: toont een lijst met alle locaties die bezocht kunnen worden. Elke locatie wordt kort beschreven. \n\nRoutes: Toont een lijst met alle routes die gelopen kunnen worden. Van elke route wordt een omschrijving gegeven. \n\nStatistieken: Toont persoonlijke statistieken. \n\nInstellingen: Hier kunnen app-instellingen worden aangepast naar eigen voorkeur. \n\nEen locatie ingedrukt houden laat extra informatie zien over de gekozen locatie. \n\n\n</string>
<string name="end_location">Eind locatie</string> <string name="end_location">Eind locatie</string>
<string name="start_location">Start locatie</string> <string name="start_location">Start locatie</string>
<string name="following_locations">"Deze route bevat de volgende locaties: "</string> <string name="following_locations">"Deze route bevat de volgende locaties: "</string>

View File

@@ -24,7 +24,7 @@
<string name="English">English</string> <string name="English">English</string>
<string name="Chinese">Chinese</string> <string name="Chinese">Chinese</string>
<string name="help">HELP</string> <string name="help">HELP</string>
<string name="help_discription">Hasn\'t been translated yet</string> <string name="help_discription">Various buttons can be seen at the bottom of the screen. These buttons have the following functions: \n\nLocations: displays a list of all locations that can be visited. Each location is briefly described. \n\nRoutes: Displays a list of all routes that can be walked. A description is given of each route. \n\nStats: Displays personal statistics. \n\nSettings: This is where app settings can be adjusted according to your preferences. \n\nHold down on a location to display additional information about the chosen location. \n\n\n</string>
<string name="notification_title">You\'re close to a location!</string> <string name="notification_title">You\'re close to a location!</string>
<string name="notification_text">You\'re almost at %1$s</string> <string name="notification_text">You\'re almost at %1$s</string>
<string name="following_locations">This route contains the following locations: </string> <string name="following_locations">This route contains the following locations: </string>

View File

@@ -2,13 +2,14 @@
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.NextLocation" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. --> <!-- Primary brand color. -->
<item name="colorPrimary">@color/primaryColour</item> <item name="colorPrimary">@color/black</item>
<!-- Secondary brand color. --> <!-- Secondary brand color. -->
<item name="colorSecondary">@color/secondaryColour</item> <item name="colorSecondary">@color/secondaryColour</item>
<!-- Customize your theme here. --> <!-- Customize your theme here. -->
<item name="colorButtonNormal">@color/buttonColour</item> <item name="colorButtonNormal">@color/buttonColour</item>
<item name="colorPrimaryDark">@color/secondaryColour</item> <item name="colorPrimaryDark">@color/secondaryColour</item>
<item name="android:textSize">16sp</item> <item name="android:textSize">16sp</item>
<item name="android:textColor">@color/black</item>
</style> </style>
<style name="Theme.Switches" parent="Theme.MaterialComponents.DayNight.NoActionBar"> <style name="Theme.Switches" parent="Theme.MaterialComponents.DayNight.NoActionBar">