Merge remote-tracking branch 'origin/RecyclerView' into Tests
@@ -15,21 +15,14 @@ public class Route implements Parcelable {
|
|||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private String name;
|
private String name;
|
||||||
|
private String description;
|
||||||
|
|
||||||
private List<Location> locations;
|
private List<Location> locations;
|
||||||
|
|
||||||
|
|
||||||
private float totalDistance;
|
private float totalDistance;
|
||||||
|
|
||||||
|
|
||||||
private int totalTime;
|
private int totalTime;
|
||||||
|
|
||||||
public Route(@NotNull String name) {
|
public Route(@NotNull String name) {
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.locations = new ArrayList<>();
|
this.locations = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Route(Parcel in) {
|
protected Route(Parcel in) {
|
||||||
@@ -103,4 +96,12 @@ public class Route implements Parcelable {
|
|||||||
parcel.writeFloat(totalDistance);
|
parcel.writeFloat(totalDistance);
|
||||||
parcel.writeInt(totalTime);
|
parcel.writeInt(totalTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,18 +41,18 @@ public class CouponFragment extends Fragment {
|
|||||||
this.couponRecyclerView.setHasFixedSize(true);
|
this.couponRecyclerView.setHasFixedSize(true);
|
||||||
this.layoutManager = new LinearLayoutManager(this.getContext());
|
this.layoutManager = new LinearLayoutManager(this.getContext());
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.coupon_back_button);
|
|
||||||
this.imageButton.setOnClickListener(v -> {
|
|
||||||
StatisticFragment statisticFragment = new StatisticFragment();
|
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit();
|
|
||||||
});
|
|
||||||
|
|
||||||
CouponListManager.INSTANCE.setContext(this.getContext());
|
CouponListManager.INSTANCE.setContext(this.getContext());
|
||||||
CouponListManager.INSTANCE.load();
|
CouponListManager.INSTANCE.load();
|
||||||
this.couponList = CouponListManager.INSTANCE.getCouponList();
|
this.couponList = CouponListManager.INSTANCE.getCouponList();
|
||||||
|
|
||||||
this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList, clickedPosition -> showPopup(this.couponList.get(clickedPosition)));
|
this.couponAdapter = new CouponAdapter(this.getContext(), this.couponList, clickedPosition -> showPopup(this.couponList.get(clickedPosition)));
|
||||||
|
|
||||||
|
this.imageButton = view.findViewById(R.id.coupon_back_button);
|
||||||
|
this.imageButton.setOnClickListener(v -> {
|
||||||
|
StatisticFragment statisticFragment = new StatisticFragment();
|
||||||
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, statisticFragment).addToBackStack(null).commit();
|
||||||
|
});
|
||||||
|
|
||||||
this.couponRecyclerView.setLayoutManager(this.layoutManager);
|
this.couponRecyclerView.setLayoutManager(this.layoutManager);
|
||||||
this.couponRecyclerView.setAdapter(this.couponAdapter);
|
this.couponRecyclerView.setAdapter(this.couponAdapter);
|
||||||
return view;
|
return view;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.a1.nextlocation.fragments;
|
package com.a1.nextlocation.fragments;
|
||||||
|
|
||||||
|
import android.media.Image;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
@@ -52,8 +53,10 @@ public class LocationFragment extends Fragment {
|
|||||||
|
|
||||||
this.locationAdapter = new LocationAdapter(this.getContext(), this.locationList, clickedPosition -> {
|
this.locationAdapter = new LocationAdapter(this.getContext(), this.locationList, clickedPosition -> {
|
||||||
LocationDetailFragment locationDetailFragment = new LocationDetailFragment();
|
LocationDetailFragment locationDetailFragment = new LocationDetailFragment();
|
||||||
|
locationDetailFragment.setLocation(this.locationList.get(clickedPosition));
|
||||||
Bundle locationBundle = new Bundle();
|
Bundle locationBundle = new Bundle();
|
||||||
locationBundle.putParcelable("location", this.locationList.get(clickedPosition));
|
locationBundle.putParcelable("location", this.locationList.get(clickedPosition));
|
||||||
|
locationDetailFragment.setLocation(this.locationList.get(clickedPosition));
|
||||||
locationDetailFragment.setArguments(locationBundle);
|
locationDetailFragment.setArguments(locationBundle);
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationDetailFragment).addToBackStack(null).commit();
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, locationDetailFragment).addToBackStack(null).commit();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,18 +11,15 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.a1.nextlocation.R;
|
import com.a1.nextlocation.R;
|
||||||
import com.a1.nextlocation.data.Route;
|
import com.a1.nextlocation.data.Route;
|
||||||
import com.a1.nextlocation.data.RouteHandler;
|
|
||||||
import com.a1.nextlocation.data.StaticData;
|
|
||||||
import com.a1.nextlocation.network.ApiHandler;
|
|
||||||
|
|
||||||
public class RouteDetailFragment extends Fragment {
|
public class RouteDetailFragment extends Fragment {
|
||||||
|
|
||||||
private Route route;
|
private Route route;
|
||||||
private TextView routeDetailText;
|
private TextView routeDetailText;
|
||||||
|
private TextView routeName;
|
||||||
private ImageButton imageButton;
|
private ImageButton imageButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -38,10 +35,11 @@ public class RouteDetailFragment extends Fragment {
|
|||||||
this.route = getArguments().getParcelable("route");
|
this.route = getArguments().getParcelable("route");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.routeDetailText = view.findViewById(R.id.routeDetailText);
|
this.routeName = view.findViewById(R.id.route_title);
|
||||||
this.routeDetailText.setText(this.route.getName());
|
this.routeName.setText(this.route.getName());
|
||||||
Button startButton = view.findViewById(R.id.start_route_button);
|
|
||||||
startButton.setOnClickListener(this::startRoute);
|
this.routeDetailText = view.findViewById(R.id.reoute_detail_tekst);
|
||||||
|
this.routeDetailText.setText(this.route.getDescription());
|
||||||
|
|
||||||
this.imageButton = view.findViewById(R.id.route_detail_back_button);
|
this.imageButton = view.findViewById(R.id.route_detail_back_button);
|
||||||
this.imageButton.setOnClickListener(v -> {
|
this.imageButton.setOnClickListener(v -> {
|
||||||
@@ -52,12 +50,4 @@ public class RouteDetailFragment extends Fragment {
|
|||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startRoute(View view) {
|
|
||||||
ApiHandler.INSTANCE.getDirections(route);
|
|
||||||
RouteHandler.INSTANCE.followRoute(route);
|
|
||||||
Toast.makeText(requireContext(),"Route started!",Toast.LENGTH_SHORT).show();
|
|
||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, new HomeFragment()).addToBackStack(null).commit();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentActivity;
|
import androidx.fragment.app.FragmentActivity;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
@@ -30,6 +31,8 @@ public class SettingsFragment extends Fragment {
|
|||||||
|
|
||||||
private ImageView imageButton;
|
private ImageView imageButton;
|
||||||
|
|
||||||
|
SwitchCompat fontChanger;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
@@ -50,6 +53,35 @@ public class SettingsFragment extends Fragment {
|
|||||||
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
fontChanger = view.findViewById(R.id.BigFont);
|
||||||
|
|
||||||
|
SharedPreferences sharedPreferences = requireActivity().getSharedPreferences("com.a1.nextlocation",0);
|
||||||
|
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||||
|
fontChanger.setChecked(sharedPreferences.getBoolean("switch", false));
|
||||||
|
|
||||||
|
if (fontChanger.isChecked()){
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocationBig);
|
||||||
|
}else if (!fontChanger.isChecked()){
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
fontChanger.setOnClickListener(view1 -> {
|
||||||
|
if(fontChanger.isChecked())
|
||||||
|
{
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocationBig);
|
||||||
|
editor.putBoolean("switch",true);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
if(!fontChanger.isChecked())
|
||||||
|
{
|
||||||
|
requireActivity().setTheme(R.style.Theme_NextLocation);
|
||||||
|
editor.putBoolean("switch",false);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
editor.commit();
|
||||||
|
});
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class StatisticFragment extends Fragment {
|
|||||||
|
|
||||||
private List<Coupon> couponList;
|
private List<Coupon> couponList;
|
||||||
private ImageView imageButton;
|
private ImageView imageButton;
|
||||||
|
private ImageView couponButton;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -50,6 +51,18 @@ public class StatisticFragment extends Fragment {
|
|||||||
couponNumber.setText(String.valueOf(adapter.getItemCount()));
|
couponNumber.setText(String.valueOf(adapter.getItemCount()));
|
||||||
|
|
||||||
|
|
||||||
|
this.imageButton = view.findViewById(R.id.statistics_back_button);
|
||||||
|
this.imageButton.setOnClickListener(v -> {
|
||||||
|
HomeFragment homeFragment = new HomeFragment();
|
||||||
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.couponButton = view.findViewById(R.id.coupon_button);
|
||||||
|
this.couponButton.setOnClickListener(v -> {
|
||||||
|
CouponFragment couponFragment = new CouponFragment();
|
||||||
|
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit();
|
||||||
|
});
|
||||||
|
|
||||||
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();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
@@ -27,10 +28,12 @@ public class LocationAdapter extends RecyclerView.Adapter<LocationAdapter.Locati
|
|||||||
class LocationViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
class LocationViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
|
|
||||||
private TextView locationName;
|
private TextView locationName;
|
||||||
|
private ImageView locationImage;
|
||||||
|
|
||||||
public LocationViewHolder(@NonNull View itemView) {
|
public LocationViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
this.locationName = itemView.findViewById(R.id.location_name);
|
this.locationName = itemView.findViewById(R.id.location_name);
|
||||||
|
this.locationImage = itemView.findViewById(R.id.location_image);
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,6 +46,13 @@ public class LocationAdapter extends RecyclerView.Adapter<LocationAdapter.Locati
|
|||||||
this.locationName = itemView.findViewById(R.id.location_name);
|
this.locationName = itemView.findViewById(R.id.location_name);
|
||||||
locationName.setText(text);
|
locationName.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setImageViewImage(String text){
|
||||||
|
this.locationImage = itemView.findViewById(R.id.location_image);
|
||||||
|
Context context = locationImage.getContext();
|
||||||
|
int id = context.getResources().getIdentifier(text, "drawable", context.getPackageName());
|
||||||
|
locationImage.setImageResource(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocationAdapter(Context context, List<Location> location, OnItemClickListener listener){
|
public LocationAdapter(Context context, List<Location> location, OnItemClickListener listener){
|
||||||
@@ -62,6 +72,7 @@ public class LocationAdapter extends RecyclerView.Adapter<LocationAdapter.Locati
|
|||||||
public void onBindViewHolder(@NonNull LocationAdapter.LocationViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull LocationAdapter.LocationViewHolder holder, int position) {
|
||||||
Location location = locationList.get(position);
|
Location location = locationList.get(position);
|
||||||
holder.setTextViewText(location.getName());
|
holder.setTextViewText(location.getName());
|
||||||
|
holder.setImageViewImage(location.getImageUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/beach_and_lounge_club.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
app/src/main/res/drawable/belcrum_beach.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
app/src/main/res/drawable/belcrum_watertoren.png
Normal file
|
After Width: | Height: | Size: 780 KiB |
BIN
app/src/main/res/drawable/coffee_and_lunch.png
Normal file
|
After Width: | Height: | Size: 981 KiB |
BIN
app/src/main/res/drawable/de_boter_hal.png
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
BIN
app/src/main/res/drawable/de_koepel_future_events.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
app/src/main/res/drawable/escaping_room.png
Normal file
|
After Width: | Height: | Size: 619 KiB |
BIN
app/src/main/res/drawable/gauchos.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
app/src/main/res/drawable/hercules_park_valkenburg.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
app/src/main/res/drawable/het_klooster_breda.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
app/src/main/res/drawable/kees_kroket.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
app/src/main/res/drawable/koningin_wilhelimna_paviljoen.png
Normal file
|
After Width: | Height: | Size: 145 KiB |
BIN
app/src/main/res/drawable/mc_donalds.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
app/src/main/res/drawable/mezz_breda.png
Normal file
|
After Width: | Height: | Size: 186 KiB |
BIN
app/src/main/res/drawable/nassau_baroniemonument.png
Normal file
|
After Width: | Height: | Size: 432 KiB |
BIN
app/src/main/res/drawable/prison_escape_room.png
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
app/src/main/res/drawable/station_breda.png
Normal file
|
After Width: | Height: | Size: 502 KiB |
BIN
app/src/main/res/drawable/subway.png
Normal file
|
After Width: | Height: | Size: 648 KiB |
BIN
app/src/main/res/drawable/t_zusje_breda.png
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
BIN
app/src/main/res/drawable/the_tosti_club.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
app/src/main/res/drawable/vr_world.png
Normal file
|
After Width: | Height: | Size: 324 KiB |
BIN
app/src/main/res/drawable/wok_to_go.png
Normal file
|
After Width: | Height: | Size: 264 KiB |
@@ -15,9 +15,9 @@
|
|||||||
android:text="@string/start_route"
|
android:text="@string/start_route"
|
||||||
android:textColor="@color/buttonColour"
|
android:textColor="@color/buttonColour"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/routeDetailText"
|
app:layout_constraintEnd_toEndOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintStart_toStartOf="@+id/routeDetailText"
|
app:layout_constraintStart_toStartOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/routeDetailText"
|
app:layout_constraintTop_toBottomOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintVertical_bias="0.873" />
|
app:layout_constraintVertical_bias="0.873" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
@@ -38,14 +38,15 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="250dp"
|
android:layout_marginEnd="250dp"
|
||||||
android:text="titel"
|
android:text="titel"
|
||||||
android:textSize="20sp"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/routeDetailImage"
|
android:textSize="30sp"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/routeDetailText"
|
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
|
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/routeDetailImage"
|
android:id="@+id/route_detail_image"
|
||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="250dp"
|
android:layout_height="250dp"
|
||||||
android:layout_marginEnd="350dp"
|
android:layout_marginEnd="350dp"
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/routeDetailText"
|
android:id="@+id/reoute_detail_tekst"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="10dp"
|
||||||
android:layout_marginStart="50dp"
|
android:layout_marginStart="50dp"
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
android:text=""
|
android:text=""
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/routeDetailImage"
|
app:layout_constraintStart_toEndOf="@id/route_detail_image"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -10,12 +10,13 @@
|
|||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/detail_location_name"
|
android:id="@+id/detail_location_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="300dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
|
android:gravity="center"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -30,16 +31,27 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
|
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<TextView
|
<ScrollView
|
||||||
android:id="@+id/detail_location_text"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="200dp"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/secondaryColour"
|
android:background="@color/secondaryColour"
|
||||||
android:text=""
|
android:text=""
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/detail_location_image" />
|
app:layout_constraintTop_toBottomOf="@+id/detail_location_image">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/detail_location_text"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/secondaryColour"
|
||||||
|
android:text="@string/locatie_detail_tekst"
|
||||||
|
/>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/detail_location_back_button"
|
android:id="@+id/detail_location_back_button"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:background="@drawable/ic_back_button_24"
|
android:background="@drawable/ic_back_button_24"
|
||||||
android:text="Back"
|
android:text="@string/terug"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,10 @@
|
|||||||
android:id="@+id/route_title"
|
android:id="@+id/route_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="30sp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="20sp"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/routeDetailImage"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -33,16 +34,16 @@
|
|||||||
android:layout_width="250dp"
|
android:layout_width="250dp"
|
||||||
android:layout_height="250dp"
|
android:layout_height="250dp"
|
||||||
android:layout_margin="40dp"
|
android:layout_margin="40dp"
|
||||||
android:id="@+id/routeDetailImage"
|
android:id="@+id/route_detail_image"
|
||||||
app:layout_constraintTop_toBottomOf="@id/route_detail_back_button"
|
app:layout_constraintTop_toBottomOf="@id/route_detail_back_button"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toTopOf="@id/routeDetailText"
|
app:layout_constraintBottom_toTopOf="@id/reoute_detail_tekst"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/routeDetailText"
|
android:id="@+id/reoute_detail_tekst"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="20dp"
|
android:layout_marginHorizontal="20dp"
|
||||||
@@ -50,7 +51,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.6"
|
app:layout_constraintHorizontal_bias="0.6"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/routeDetailImage" />
|
app:layout_constraintTop_toBottomOf="@id/route_detail_image" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/start_route_button"
|
android:id="@+id/start_route_button"
|
||||||
@@ -63,7 +64,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.498"
|
app:layout_constraintHorizontal_bias="0.498"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/routeDetailText"
|
app:layout_constraintTop_toBottomOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintVertical_bias="0.671" />
|
app:layout_constraintVertical_bias="0.671" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -163,6 +163,7 @@
|
|||||||
android:id="@+id/settingsOldButton"
|
android:id="@+id/settingsOldButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:id="@+id/BigFont"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/Balk3"
|
app:layout_constraintStart_toStartOf="@id/Balk3"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:background="@color/primaryColour"
|
android:background="@color/primaryColour"
|
||||||
android:id="@+id/statisticsFragment"
|
android:id="@+id/statisticsFragment"
|
||||||
tools:context=".fragments.StatisticFragment">
|
tools:context=".fragments.StatisticFragment">
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
android:id="@+id/name_box"
|
android:id="@+id/name_box"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
|
android:layout_marginHorizontal="20dp"
|
||||||
|
android:background="@color/secondaryColour"
|
||||||
app:layout_constraintBottom_toTopOf="@id/Box2"
|
app:layout_constraintBottom_toTopOf="@id/Box2"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/textView"
|
app:layout_constraintTop_toBottomOf="@id/textView"
|
||||||
android:background="@color/secondaryColour"
|
|
||||||
android:layout_marginHorizontal="20dp"
|
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -52,8 +52,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/statistics_km"
|
android:id="@+id/statistics_km"
|
||||||
@@ -128,8 +127,7 @@
|
|||||||
app:layout_constraintBottom_toTopOf="@id/Box4"
|
app:layout_constraintBottom_toTopOf="@id/Box4"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/Box2"
|
app:layout_constraintTop_toBottomOf="@id/Box2">
|
||||||
>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -170,14 +168,14 @@
|
|||||||
android:id="@+id/Box4"
|
android:id="@+id/Box4"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="70dp"
|
||||||
|
android:layout_marginHorizontal="20dp"
|
||||||
|
android:background="@color/secondaryColour"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.85"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/Box3"
|
|
||||||
android:background="@color/secondaryColour"
|
|
||||||
android:layout_marginHorizontal="20dp"
|
|
||||||
|
|
||||||
>
|
app:layout_constraintTop_toBottomOf="@id/Box3">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -198,10 +196,10 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/couponAmount"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/couponAmount"
|
android:id="@+id/couponAmount"
|
||||||
@@ -213,15 +211,30 @@
|
|||||||
app:layout_constraintStart_toStartOf="@id/Balk4"
|
app:layout_constraintStart_toStartOf="@id/Balk4"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/coupon_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:background="@drawable/ic_back_button_24"
|
||||||
|
android:scaleX="-1"
|
||||||
|
android:text="@string/terug"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/couponAmount"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/couponAmount" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/imageButton"
|
android:id="@+id/statistics_back_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
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:background="@drawable/ic_back_button_24"
|
||||||
|
android:backgroundTint="@color/buttonColour"
|
||||||
android:src="@drawable/ic_back_button_24"
|
android:src="@drawable/ic_back_button_24"
|
||||||
|
android:text="@string/terug"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
@@ -8,24 +9,26 @@
|
|||||||
android:layout_margin="20dp">
|
android:layout_margin="20dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/location_image"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:id="@+id/location_image"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
/>
|
app:layout_constraintEnd_toStartOf="@id/location_name"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="1.0" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/location_name"
|
android:id="@+id/location_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="321dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="47dp"
|
||||||
android:layout_marginEnd="294dp"
|
android:gravity="left"
|
||||||
android:gravity="center"
|
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -7,5 +7,16 @@
|
|||||||
<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="android:textSize">16sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.NextLocationBig" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
|
<!-- Primary brand color. -->
|
||||||
|
<item name="colorPrimary">@color/primaryColour</item>
|
||||||
|
<!-- Secondary brand color. -->
|
||||||
|
<item name="colorSecondary">@color/secondaryColour</item>
|
||||||
|
<!-- Customize your theme here. -->
|
||||||
|
<item name="colorButtonNormal">@color/buttonColour</item>
|
||||||
|
<item name="android:textSize">24sp</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||