62 Commits

Author SHA1 Message Date
Sem van der Hoeven
5edf50c808 Merge branch 'Fragment' into develop 2020-12-17 10:07:36 +01:00
Sem van der Hoeven
db7d944a41 [ADD] log 2020-12-17 10:04:43 +01:00
Sem van der Hoeven
3f132f48a7 [ADD] start of api calls 2020-12-16 12:11:48 +01:00
Sem van der Hoeven
17f624cc30 [ADD] longitude latitude doubles in location 2020-12-16 11:54:35 +01:00
Robin Koedood
4f68398f33 [ADD] route detail landscape mode 2020-12-16 11:38:24 +01:00
Robin Koedood
4229acf87c [ADD] Route Detail Contraints 2020-12-16 11:20:52 +01:00
Sem van der Hoeven
521c9fd188 Merge branch 'RecyclerView' into develop 2020-12-16 11:20:41 +01:00
Sem van der Hoeven
1fd245f4f0 [ADD] all methods from daos to repos 2020-12-16 11:04:06 +01:00
Sem van der Hoeven
8d210a9707 [ADD] image url to location 2020-12-16 10:58:44 +01:00
RemoMeijer
ee1ae23e0f Merge branch 'develop' into RecyclerView 2020-12-16 10:56:36 +01:00
Sem van der Hoeven
49f78efdd3 [ADD] update and insert coupon 2020-12-16 10:56:03 +01:00
Sem van der Hoeven
512ad3980f [FIX] mapview stuff 2020-12-16 10:48:11 +01:00
RemoMeijer
e2f76c94f7 Merge branch 'develop' into RecyclerView
# Conflicts: resolved
#	app/src/main/res/layout/fragment_location.xml
#	app/src/main/res/layout/fragment_location_detail.xml
2020-12-16 10:43:46 +01:00
Sem van der Hoeven
2479563474 Merge branch 'data' into develop 2020-12-14 15:10:09 +01:00
Sem van der Hoeven
ea59b97f0f merge fragment 2020-12-14 15:09:59 +01:00
Sem van der Hoeven
0b9bba63a3 added all daos 2020-12-14 15:07:53 +01:00
sebas
75b7ff47cd [Added] small changes to route detail, location detail 2020-12-14 14:51:43 +01:00
sebas
a2d1ecfc71 [Added] layout created for routedetailfragment 2020-12-14 14:38:47 +01:00
Sem van der Hoeven
890a5264d6 added initmapview 2020-12-14 14:37:50 +01:00
Sem van der Hoeven
2792a62069 merge conflicts 2020-12-14 14:36:52 +01:00
Sem van der Hoeven
b3be078361 added mapview and osm map 2020-12-14 14:35:53 +01:00
RemoMeijer
148e84483a Added mapView 2020-12-14 14:35:24 +01:00
RemoMeijer
bf1c5d0ac4 Added fragment_location layout and location_item layout 2020-12-14 14:20:54 +01:00
Bipin
0092b2e839 fixie wixie 2020-12-14 14:08:40 +01:00
Bipin
9854f5f6ab finalize main activity (for now) 2020-12-14 14:07:08 +01:00
sebas
7c200bf780 [Added] Created route_item layout and filled it, also filled fragment_route 2020-12-14 14:01:41 +01:00
RemoMeijer
b174778dbf Merge branch 'Fragment' of https://github.com/SemvdH/Next-Location into Fragment 2020-12-14 14:00:55 +01:00
RemoMeijer
d33237791b Added location detail, location_item 2020-12-14 14:00:15 +01:00
Robin Koedood
c6a9b175cc [ADD] coupon landscape mode 2020-12-14 13:59:13 +01:00
Robin Koedood
d4d3e8d19f [ADD] forgot one string 2020-12-14 13:58:01 +01:00
Robin Koedood
8aa316fc97 [ADD] String values 2020-12-14 13:55:13 +01:00
Robin Koedood
ed6d80b399 [ADD] Imagebutton 2020-12-14 13:50:46 +01:00
Bipin
dc69d9a2ad Merge branch 'Fragment' of https://github.com/SemvdH/Next-Location into Fragment 2020-12-14 13:41:36 +01:00
Bipin
83796481e8 back button image added 2020-12-14 13:41:23 +01:00
Robin Koedood
14d9cf686f Merge remote-tracking branch 'origin/Fragment' into Fragment 2020-12-14 13:40:53 +01:00
Robin Koedood
49ec448e56 [FIXED] offset 2020-12-14 13:40:48 +01:00
Bart
996b061b65 Merge branch 'bottomNavigation' into develop 2020-12-14 13:36:18 +01:00
Bipin
64f76f46c0 Added top bar 2020-12-14 13:35:16 +01:00
Sem van der Hoeven
8fdb88f71a data dao 2020-12-14 13:16:03 +01:00
Bipin
8c25197967 Merge branch 'Fragment' of https://github.com/SemvdH/Next-Location into Fragment 2020-12-14 13:13:55 +01:00
Bipin
180f7fc051 fixed icon in navbar 2020-12-14 13:13:36 +01:00
Robin Koedood
9622d3d068 [ADD] Coupons fragments, changed box height 2020-12-14 12:33:28 +01:00
Robin Koedood
a2365d1c19 [ADD] Statistieken en settings fragments 2020-12-14 12:20:51 +01:00
Sem van der Hoeven
6b97c21a8b added ignores to fields that dont need to be in the database 2020-12-14 12:16:39 +01:00
Sem van der Hoeven
23d23bead4 added location dao and repository 2020-12-14 12:13:15 +01:00
Robin Koedood
297067fcb2 Merge remote-tracking branch 'origin/Fragment' into Fragment 2020-12-14 12:06:38 +01:00
Robin Koedood
19ae360ee0 [ADD] Settings fragment 2020-12-14 12:06:25 +01:00
RemoMeijer
16b9b15856 Added some functionality 2020-12-14 12:05:32 +01:00
Sem van der Hoeven
204d45cece added packages for dao and repository 2020-12-14 12:03:47 +01:00
Sem van der Hoeven
08215e18c5 added database and coupon and route daos 2020-12-14 12:00:01 +01:00
sebas
63c49c40d7 [change] Small change to adapter classes 2020-12-14 11:39:29 +01:00
sebas
13b73fb0de [Added] created method for CouponListManager 2020-12-14 11:21:43 +01:00
sebas
e5fa7db27d [Added] Added some functionallity to the adapters (not finished yet due to missing functionallity from other classes) 2020-12-14 11:19:39 +01:00
Sem van der Hoeven
c4fd44ad76 added room dependency 2020-12-14 11:19:11 +01:00
Sem van der Hoeven
3e9e41c118 Merge branch 'data' of https://github.com/SemvdH/Next-Location into data 2020-12-14 11:17:28 +01:00
Sem van der Hoeven
64c8b0591a [ADD] constructors 2020-12-14 11:16:40 +01:00
sebas
aee2797a0f [Added] methods to CouponAdapter 2020-12-14 11:10:51 +01:00
RemoMeijer
12b446b679 Implemented all Methods and interfaces 2020-12-14 11:09:00 +01:00
Bart
8f8303d66a Merge remote-tracking branch 'origin/data' into data 2020-12-14 11:04:53 +01:00
Bart
a2ffef1099 [ADD] data & location class fields and getters / setters 2020-12-14 11:04:31 +01:00
Sem van der Hoeven
dec62e8b9a [ADD] coupon class fields and getters / setters 2020-12-14 10:56:49 +01:00
Sem van der Hoeven
fac41e2ade [ADD] route class fields and getters / setters 2020-12-14 10:55:39 +01:00
55 changed files with 2665 additions and 84 deletions

View File

@@ -30,10 +30,19 @@ android {
dependencies {
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
//gson
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.13.1'
// okhttp

View File

@@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.a1.nextlocation">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

View File

@@ -1,4 +1,48 @@
package com.a1.nextlocation.data;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import org.jetbrains.annotations.NotNull;
@Entity(tableName = "coupon")
public class Coupon {
/**
* fields need to be public for the database to be able to use them
*/
@PrimaryKey
@NonNull
@ColumnInfo(name = "code")
private String code;
@ColumnInfo(name = "reward")
@NonNull
private String reward;
public Coupon(@NonNull String code, @NotNull String reward) {
this.code = code;
this.reward = reward;
}
@NonNull
public String getCode() {
return code;
}
@NonNull
public String getReward() {
return reward;
}
public void setCode(@NonNull String code) {
this.code = code;
}
public void setReward(@NonNull String reward) {
this.reward = reward;
}
}

View File

@@ -1,4 +1,107 @@
package com.a1.nextlocation.data;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;
import com.a1.nextlocation.data.db.CouponListTypeConverter;
import java.util.ArrayList;
import java.util.List;
@Entity(tableName = "userdata")
public class Data {
@PrimaryKey
@NonNull
@ColumnInfo(name = "distance_traveled")
private float distanceTraveled;
@ColumnInfo(name = "locations_visited")
private int locationsVisited;
@ColumnInfo(name = "total_time")
private int totalTime;
@TypeConverters(CouponListTypeConverter.class)
private List<Coupon> couponList;
@Ignore
private Location nextLocation;
@Ignore
private Location lastLocation;
@Ignore
private Route currentRoute;
public Data() {
this.distanceTraveled = 0;
this.locationsVisited = 0;
this.totalTime = 0;
couponList = new ArrayList<>();
}
public float getDistanceTraveled() {
return distanceTraveled;
}
public void setDistanceTraveled(float distanceTraveled) {
this.distanceTraveled = distanceTraveled;
}
public int getLocationsVisited() {
return locationsVisited;
}
public void setLocationsVisited(int locationsVisited) {
this.locationsVisited = locationsVisited;
}
public int getTotalTime() {
return totalTime;
}
public void setTotalTime(int totalTime) {
this.totalTime = totalTime;
}
public List<Coupon> getCouponList() {
return couponList;
}
public void setCouponList(List<Coupon> couponList) {
this.couponList = couponList;
}
public Location getNextLocation() {
return nextLocation;
}
public void setNextLocation(Location nextLocation) {
this.nextLocation = nextLocation;
}
public Location getLastLocation() {
return lastLocation;
}
public void setLastLocation(Location lastLocation) {
this.lastLocation = lastLocation;
}
public Route getCurrentRoute() {
return currentRoute;
}
public void setCurrentRoute(Route currentRoute) {
this.currentRoute = currentRoute;
}
}

View File

@@ -1,4 +1,12 @@
package com.a1.nextlocation.data;
public class FileIO {
public static void readFileData() {
}
public static void writeFileData() {
}
}

View File

@@ -1,4 +1,94 @@
package com.a1.nextlocation.data;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import org.jetbrains.annotations.NotNull;
@Entity(tableName = "location")
public class Location {
@PrimaryKey
@NonNull
private String name;
/**
* coordinates will be saved as for example: 2.434343,4.65656;3.656565,6.43434
* so lat1,long1;lat2,long2
*/
private String coordinates;
private String description;
@ColumnInfo(name = "image_url")
@Nullable
private String imageUrl;
public Location(@NotNull String name, String coordinates, String description, @Nullable String imageUrl) {
this.name = name;
this.coordinates = coordinates;
this.description = description;
this.imageUrl = imageUrl;
}
public Location(@NotNull String name, double latCoord, double longCoord, String description, @Nullable String imageUrl) {
this(name,getStringFromCoordinates(latCoord,longCoord),description,imageUrl);
}
@NotNull
public String getName() {
return name;
}
public void setName(@NotNull String name) {
this.name = name;
}
public String getCoordinates() {
return coordinates;
}
public void setCoordinates(String coordinates) {
this.coordinates = coordinates;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Nullable
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(@Nullable String imageUrl) {
this.imageUrl = imageUrl;
}
public double[] getCoordinatesAsDoubles() {
double[] res = new double[2];
res[0] = getLat();
res[1] = getLong();
return res;
}
public double getLat() {
return Double.parseDouble(this.coordinates.split(",")[0]);
}
public double getLong() {
return Double.parseDouble(this.coordinates.split(",")[1]);
}
public static String getStringFromCoordinates(double lat1, double long1) {
return lat1 + "," + long1;
}
}

View File

@@ -1,4 +1,79 @@
package com.a1.nextlocation.data;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;
import com.a1.nextlocation.data.db.LocationListTypeConverter;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
@Entity(tableName = "route")
public class Route {
@PrimaryKey
@NonNull
private String name;
@TypeConverters(LocationListTypeConverter.class)
private List<Location> locations;
@ColumnInfo(name = "total_distance")
private float totalDistance;
@ColumnInfo(name = "total_time")
private int totalTime;
public Route(@NotNull String name) {
this.name = name;
this.locations = new ArrayList<>();
}
public void addLocation(Location location) {
this.locations.add(location);
}
@NotNull
public String getName() {
return name;
}
public void setName(@NotNull String name) {
this.name = name;
}
public List<Location> getLocations() {
return locations;
}
public void setLocations(List<Location> locations) {
this.locations = locations;
}
public float getTotalDistance() {
//TODO calculate total distance according to all locations in list
return totalDistance;
}
public int getTotalTime() {
//TODO calculate total time according to all locations in list
return totalTime;
}
public void setTotalDistance(float totalDistance) {
this.totalDistance = totalDistance;
}
public void setTotalTime(int totalTime) {
this.totalTime = totalTime;
}
}

View File

@@ -0,0 +1,33 @@
package com.a1.nextlocation.data.db;
import androidx.room.TypeConverter;
import com.a1.nextlocation.data.Coupon;
import com.a1.nextlocation.data.Route;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
public class CouponListTypeConverter {
private static Gson gson = new Gson();
@TypeConverter
public static List<Coupon> toRoutesList(String data) {
if (data == null) {
return Collections.emptyList();
}
Type listType = new TypeToken<List<Coupon>>() {}.getType();
return gson.fromJson(data,listType);
}
@TypeConverter
public static String fromRoutesList(List<Coupon> list) {
return gson.toJson(list);
}
}

View File

@@ -0,0 +1,62 @@
package com.a1.nextlocation.data.db;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.room.Room;
import androidx.room.RoomDatabase;
import androidx.sqlite.db.SupportSQLiteDatabase;
import com.a1.nextlocation.data.Coupon;
import com.a1.nextlocation.data.Data;
import com.a1.nextlocation.data.Location;
import com.a1.nextlocation.data.Route;
import com.a1.nextlocation.data.db.dao.CouponDao;
import com.a1.nextlocation.data.db.dao.DataDao;
import com.a1.nextlocation.data.db.dao.LocationDao;
import com.a1.nextlocation.data.db.dao.RouteDao;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* @author Sem
*/
@androidx.room.Database(entities = {Coupon.class,Route.class, Location.class, Data.class},version = 1,exportSchema = false)
public abstract class Database extends RoomDatabase {
public abstract RouteDao routeDao();
public abstract CouponDao couponDao();
public abstract LocationDao locationDao();
public abstract DataDao dataDao();
private static volatile Database INSTANCE;
private static final int NUMBER_OF_THREADS = 4;
static final ExecutorService databaseWriterExecutor = Executors.newFixedThreadPool(NUMBER_OF_THREADS);
public static Database getDatabase(final Context context) {
if (INSTANCE == null){
synchronized (Database.class) {
if (INSTANCE == null) {
INSTANCE = Room.databaseBuilder(context.getApplicationContext(),
Database.class,"next_location_db").addCallback(callback).build();
}
}
}
return INSTANCE;
}
private static RoomDatabase.Callback callback = new RoomDatabase.Callback() {
@Override
public void onCreate(@NonNull SupportSQLiteDatabase db) {
super.onCreate(db);
databaseWriterExecutor.execute(() -> {
// TODO populate our database here
});
}
};
}

View File

@@ -0,0 +1,31 @@
package com.a1.nextlocation.data.db;
import androidx.room.TypeConverter;
import com.a1.nextlocation.data.Location;
import com.a1.nextlocation.data.Route;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
public class LocationListTypeConverter {
private static Gson gson = new Gson();
@TypeConverter
public static List<Location> toLocationList(String data) {
if (data == null) {
return Collections.emptyList();
}
Type listType = new TypeToken<List<Location>>() {}.getType();
return gson.fromJson(data,listType);
}
@TypeConverter
public static String fromLocationList(List<Location> list) {
return gson.toJson(list);
}
}

View File

@@ -0,0 +1,34 @@
package com.a1.nextlocation.data.db.dao;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
import com.a1.nextlocation.data.Coupon;
import java.util.List;
@Dao
public interface CouponDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insertAll(Coupon... coupons);
@Query("DELETE FROM coupon")
void deleteAll();
@Query("SELECT * FROM coupon")
LiveData<List<Coupon>> selectAll();
@Update
public void update(Coupon coupon);
/*
to add an observer to the livedata, you can use the example from https://medium.com/mindorks/using-room-database-with-livedata-android-jetpack-cbf89b677b47
*/
@Query("SELECT * FROM coupon WHERE code = :code LIMIT 1")
Coupon selectCouponByCode(String code);
}

View File

@@ -0,0 +1,31 @@
package com.a1.nextlocation.data.db.dao;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;
import com.a1.nextlocation.data.Data;
@Dao
public interface DataDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insertAll(Data... datas);
@Update
void update(Data data);
@Query("DELETE FROM userdata")
void delete();
@Query("SELECT * FROM userdata LIMIT 1")
Data getData();
@Query("SELECT * FROM userdata WHERE distance_traveled = :distance LIMIT 1")
Data getDataByDistance(float distance);
}

View File

@@ -0,0 +1,27 @@
package com.a1.nextlocation.data.db.dao;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import com.a1.nextlocation.data.Location;
import java.util.List;
@Dao
public interface LocationDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
void insertAll(Location... locations);
@Query("DELETE FROM location")
void deleteAll();
@Query("SELECT * FROM location")
LiveData<List<Location>> selectAll();
@Query("SELECT * FROM location WHERE name = :name LIMIT 1")
Location getLocationByName(String name);
}

View File

@@ -0,0 +1,27 @@
package com.a1.nextlocation.data.db.dao;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;
import com.a1.nextlocation.data.Route;
import java.util.List;
@Dao
public interface RouteDao {
@Insert
void insertAll(Route... routes);
@Query("DELETE FROM route")
void deleteAll();
@Query("SELECT * FROM route")
LiveData<List<Route>> getAll();
@Query("SELECT * FROM route where name = :name LIMIT 1")
Route getRouteByName(String name);
}

View File

@@ -0,0 +1,42 @@
package com.a1.nextlocation.data.db.repositories;
import android.content.Context;
import androidx.lifecycle.LiveData;
import com.a1.nextlocation.data.Coupon;
import com.a1.nextlocation.data.db.dao.CouponDao;
import com.a1.nextlocation.data.db.Database;
import java.util.List;
public class CouponRepository {
private CouponDao mCouponDao;
private LiveData<List<Coupon>> mAllCoupons;
public CouponRepository(Context context) {
Database db = Database.getDatabase(context);
mCouponDao = db.couponDao();
mAllCoupons = mCouponDao.selectAll();
}
public void insert(Coupon... coupons) {
mCouponDao.insertAll(coupons);
}
public void update(Coupon coupon) {
mCouponDao.update(coupon);
}
public LiveData<List<Coupon>> getAllCoupons() {
return mAllCoupons;
}
public Coupon getCoupon(String code) {
return mCouponDao.selectCouponByCode(code);
}
public void deleteAll() {
mCouponDao.deleteAll();
}
}

View File

@@ -0,0 +1,40 @@
package com.a1.nextlocation.data.db.repositories;
import android.content.Context;
import com.a1.nextlocation.data.Data;
import com.a1.nextlocation.data.db.Database;
import com.a1.nextlocation.data.db.dao.DataDao;
public class DataRepository {
private DataDao mDataDao;
private Data data;
public DataRepository(Context context) {
Database db = Database.getDatabase(context);
mDataDao = db.dataDao();
data = mDataDao.getData();
}
public Data getData() {
return data;
}
public Data getDataByDistance(float distance) {
return mDataDao.getDataByDistance(distance);
}
public void deleteAll() {
mDataDao.delete();
}
public void update(Data data) {
mDataDao.update(data);
}
public void insertAll(Data... datas) {
mDataDao.insertAll(datas);
}
}

View File

@@ -0,0 +1,38 @@
package com.a1.nextlocation.data.db.repositories;
import android.content.Context;
import androidx.lifecycle.LiveData;
import com.a1.nextlocation.data.Location;
import com.a1.nextlocation.data.db.Database;
import com.a1.nextlocation.data.db.dao.LocationDao;
import java.util.List;
public class LocationRepository {
private LocationDao mLocationDao;
private LiveData<List<Location>> mAllLocations;
public LocationRepository(Context context) {
Database db = Database.getDatabase(context);
mLocationDao = db.locationDao();
mAllLocations = mLocationDao.selectAll();
}
public LiveData<List<Location>> getAllLocations() {
return mAllLocations;
}
public Location getLocationByName(String name) {
return mLocationDao.getLocationByName(name);
}
public void insertAll(Location... locations) {
mLocationDao.insertAll(locations);
}
public void deleteAll() {
mLocationDao.deleteAll();
}
}

View File

@@ -0,0 +1,34 @@
package com.a1.nextlocation.data.db.repositories;
import android.content.Context;
import androidx.lifecycle.LiveData;
import com.a1.nextlocation.data.Route;
import com.a1.nextlocation.data.db.Database;
import com.a1.nextlocation.data.db.dao.RouteDao;
import java.util.List;
public class RouteRepository {
private RouteDao mRouteDao;
private LiveData<List<Route>> mAllRoutes;
public RouteRepository(Context context) {
Database db = Database.getDatabase(context);
mRouteDao = db.routeDao();
mAllRoutes = mRouteDao.getAll();
}
public LiveData<List<Route>> getAllRoutes() {
return mAllRoutes;
}
public Route getRouteByName(String name) {
return mRouteDao.getRouteByName(name);
}
public void deleteAll() {
mRouteDao.deleteAll();
}
}

View File

@@ -1,20 +1,51 @@
package com.a1.nextlocation.fragments;
import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.location.Location;
import android.location.LocationManager;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import com.a1.nextlocation.R;
import org.osmdroid.api.IMapController;
import org.osmdroid.config.Configuration;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.compass.CompassOverlay;
import org.osmdroid.views.overlay.compass.InternalCompassOrientationProvider;
import org.osmdroid.views.overlay.mylocation.GpsMyLocationProvider;
import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay;
import java.util.ArrayList;
public class HomeFragment extends Fragment {
private final String userAgent = "com.ai.nextlocation.fragments";
private MapView mapView;
private final int REQUEST_PERMISSIONS_REQUEST_CODE = 1;
private final String TAG = HomeFragment.class.getCanonicalName();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestPermissionsIfNecessary(
// if you need to show the current location request FINE_LOCATION permission
Manifest.permission.ACCESS_FINE_LOCATION,
// WRITE_EXTERNAL_STORAGE is required in order to show the map
Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
@@ -23,5 +54,80 @@ public class HomeFragment extends Fragment {
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_home, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
initMap(view);
}
private void initMap(@NonNull View view) {
// set the user agent
Configuration.getInstance().setUserAgentValue(userAgent);
// create the map view
mapView = view.findViewById(R.id.mapView);
mapView.setDestroyMode(false);
mapView.setTag("mapView");
mapView.setMultiTouchControls(true);
// get the location provider
GpsMyLocationProvider gpsMyLocationProvider = new GpsMyLocationProvider(this.requireContext());
// add the compass overlay
CompassOverlay compassOverlay = new CompassOverlay(requireContext(),new InternalCompassOrientationProvider(requireContext()),mapView);
compassOverlay.enableCompass();
mapView.getOverlays().add(compassOverlay);
// add the location overlay
MyLocationNewOverlay mLocationOverlay = new MyLocationNewOverlay(gpsMyLocationProvider, mapView);
mLocationOverlay.enableFollowLocation();
mLocationOverlay.enableMyLocation();
mapView.getOverlays().add(mLocationOverlay);
// add the zoom controller
IMapController mapController = mapView.getController();
mapController.setZoom(15.0);
// add location manager and set the start point
LocationManager locationManager = (LocationManager) requireActivity().getSystemService(Context.LOCATION_SERVICE);
try {
Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
GeoPoint startPoint = new GeoPoint(location.getLatitude(), location.getLongitude());
mapController.setCenter(startPoint);
} catch (SecurityException e) {
Log.d(TAG, "onViewCreated: exception while getting location: " + e.getLocalizedMessage());
requestPermissionsIfNecessary(
// if you need to show the current location request FINE_LOCATION permission
Manifest.permission.ACCESS_FINE_LOCATION,
// WRITE_EXTERNAL_STORAGE is required in order to show the map
Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
}
private void requestPermissionsIfNecessary(String... permissions) {
ArrayList<String> permissionsToRequest = new ArrayList<>();
if (this.getContext() != null)
for (String permission : permissions) {
if (ContextCompat.checkSelfPermission(this.getContext(), permission)
!= PackageManager.PERMISSION_GRANTED) {
// Permission is not granted
permissionsToRequest.add(permission);
}
}
if (permissionsToRequest.size() > 0 && this.getActivity() != null) {
ActivityCompat.requestPermissions(
this.getActivity(),
permissionsToRequest.toArray(new String[0]),
REQUEST_PERMISSIONS_REQUEST_CODE);
}
}
}

View File

@@ -2,12 +2,17 @@ package com.a1.nextlocation.fragments;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.a1.nextlocation.MainActivity;
import com.a1.nextlocation.R;
public class SettingsFragment extends Fragment {
@@ -15,13 +20,25 @@ public class SettingsFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_settings, container, false);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// Inflate the layout for this fragment
Spinner dropdown = view.findViewById(R.id.dropdown_menu_Settings);
String[] items = new String[]{"Nederlands", "Engels", "Chinees"};
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_dropdown_item, items);
dropdown.setAdapter(arrayAdapter);
}
}

View File

@@ -0,0 +1,68 @@
package com.a1.nextlocation.network;
import android.util.Log;
import com.a1.nextlocation.data.Location;
import com.a1.nextlocation.data.Route;
import java.io.IOException;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public enum ApiHandler {
INSTANCE;
private static String TAG = ApiHandler.class.getCanonicalName();
public static final MediaType JSON = MediaType.get("application/json; charset=utf-8");
private final String BASE_URL = "https://api.openrouteservice.org/v2/directions/";
private final String API_KEY = "5b3ce3597851110001cf6248d4eee2099f724255918adc71cc502b2a";
private final String DIRECTIONS_MODE = "foot_walking";
private OkHttpClient client = new OkHttpClient();
public Route getDirections(Location startLocation, Location endLocation) {
return getDirections(startLocation.getCoordinates(),endLocation.getCoordinates());
}
public Route getDirections(double startLat, double startLong, double endLat, double endLong) {
return getDirections(startLat + "," + startLong, endLat + "," + endLong);
}
public Route getDirections(String startLocation, String endLocation) {
String requestUrl = BASE_URL + DIRECTIONS_MODE + "?api_key=" + API_KEY + "&start=" +startLocation + "&end=" + endLocation;
AtomicReference<Route> res = null;
Thread t = new Thread(() -> {
Request request = new Request.Builder().url(requestUrl).build();
try (Response response = client.newCall(request).execute()) {
if (response.body() != null) {
String responseString = Objects.requireNonNull(response.body()).string();
Log.d(TAG, "getDirections: got response: " + responseString);
}
} catch (IOException e) {
Log.d(TAG, "getDirections: caught exception: " + e.getLocalizedMessage());
}
});
t.start();
try {
t.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
return res.get();
}
}

View File

@@ -1,8 +1,61 @@
package com.a1.nextlocation.recyclerview;
public class CouponAdapter {
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
class CouponViewHolder {
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.a1.nextlocation.data.Coupon;
import java.util.List;
public class CouponAdapter extends RecyclerView.Adapter<CouponAdapter.CouponViewHolder> {
private Context appContext;
private List<Coupon> couponList;
private OnItemClickListener clickListener;
public interface OnItemClickListener {
void onItemClick(int clickedPosition);
}
class CouponViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
public CouponViewHolder(@NonNull View itemView) {
super(itemView);
}
@Override
public void onClick(View view) {
clickListener.onItemClick(getAdapterPosition());
}
}
public CouponAdapter(Context context, List<Coupon> coupon, OnItemClickListener listener){
appContext = context;
couponList = coupon;
clickListener = listener;
}
@NonNull
@Override
public CouponViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(@NonNull CouponViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return couponList.size();
}
}

View File

@@ -1,4 +1,23 @@
package com.a1.nextlocation.recyclerview;
import com.a1.nextlocation.data.Coupon;
import java.util.List;
public class CouponListManager {
private List<Coupon> coupon;
public CouponListManager(){
}
public List<Coupon> getCoupon() {
return coupon;
}
public void setCoupon(List<Coupon> location) {
this.coupon = coupon;
}
}

View File

@@ -1,4 +1,8 @@
package com.a1.nextlocation.recyclerview;
public class CouponLoader {
public class CouponLoader implements Loader{
@Override
public void load() {
}
}

View File

@@ -0,0 +1,5 @@
package com.a1.nextlocation.recyclerview;
public interface Loader {
void load();
}

View File

@@ -1,8 +1,70 @@
package com.a1.nextlocation.recyclerview;
public class LocationAdapter {
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
class LocationViewHolder {
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.a1.nextlocation.R;
import com.a1.nextlocation.data.Location;
import java.util.List;
public class LocationAdapter extends RecyclerView.Adapter<LocationAdapter.LocationViewHolder> {
private Context appContext;
private List<Location> locationList;
private CouponAdapter.OnItemClickListener clickListener;
public interface OnItemClickListener {
void onItemClick(int clickedPosition);
}
class LocationViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private TextView locationName;
public LocationViewHolder(@NonNull View itemView) {
super(itemView);
this.locationName = itemView.findViewById(R.id.location_name);
}
@Override
public void onClick(View view) {
clickListener.onItemClick(getAdapterPosition());
}
public void setTextViewText(String text){
locationName.setText(text);
}
}
public LocationAdapter(Context context, List<Location> location, CouponAdapter.OnItemClickListener listener){
this.appContext = context;
this.locationList = location;
this.clickListener = listener;
}
@NonNull
@Override
public LocationAdapter.LocationViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.fragment_location, parent, false);
LocationViewHolder viewHolder = new LocationViewHolder(itemView);
return viewHolder;
}
@Override
public void onBindViewHolder(@NonNull LocationAdapter.LocationViewHolder holder, int position) {
Location location = locationList.get(position);
holder.setTextViewText(location.getName());
}
@Override
public int getItemCount() {
return locationList.size();
}
}

View File

@@ -1,4 +1,22 @@
package com.a1.nextlocation.recyclerview;
import com.a1.nextlocation.data.Location;
import java.util.List;
public class LocationListManager {
private List<Location> location;
public LocationListManager(){
}
public List<Location> getLocation() {
return location;
}
public void setLocation(List<Location> location) {
this.location = location;
}
}

View File

@@ -1,4 +1,8 @@
package com.a1.nextlocation.recyclerview;
public class LocationLoader {
public class LocationLoader implements Loader{
@Override
public void load() {
}
}

View File

@@ -1,8 +1,57 @@
package com.a1.nextlocation.recyclerview;
public class RouteAdapter {
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
class RouteViewHolder {
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.a1.nextlocation.data.Route;
import java.util.List;
public class RouteAdapter extends RecyclerView.Adapter<RouteAdapter.RouteViewHolder>{
private Context appContext;
private List<Route> routeList;
private CouponAdapter.OnItemClickListener clickListener;
public interface OnItemClickListener {
void onItemClick(int clickedPosition);
}
class RouteViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
public RouteViewHolder(@NonNull View itemView) {
super(itemView);
}
@Override
public void onClick(View view) {
clickListener.onItemClick(getAdapterPosition());
}
}
public RouteAdapter(Context context, List<Route> route, CouponAdapter.OnItemClickListener listener){
appContext = context;
routeList = route;
clickListener = listener;
}
@NonNull
@Override
public RouteAdapter.RouteViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
}
@Override
public void onBindViewHolder(@NonNull RouteAdapter.RouteViewHolder holder, int position) {
}
@Override
public int getItemCount() {
return routeList.size();
}
}

View File

@@ -1,4 +1,27 @@
package com.a1.nextlocation.recyclerview;
public class RouteListManager {
import com.a1.nextlocation.data.Route;
import java.util.List;
public class RouteListManager implements Loader{
List<Route> routes;
public RouteListManager(){
}
public List<Route> getRoutes() {
return routes;
}
public void setRoutes(List<Route> routes) {
this.routes = routes;
}
@Override
public void load() {
}
}

View File

@@ -1,4 +1,8 @@
package com.a1.nextlocation.recyclerview;
public class RouteLoader {
public class RouteLoader implements Loader {
@Override
public void load() {
}
}

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M17.77,3.77l-1.77,-1.77l-10,10l10,10l1.77,-1.77l-8.23,-8.23z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7,18h2L9,6L7,6v12zM11,22h2L13,2h-2v20zM3,14h2v-4L3,10v4zM15,18h2L17,6h-2v12zM19,10v4h2v-4h-2z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C8.13,2 5,5.13 5,9c0,5.25 7,13 7,13s7,-7.75 7,-13c0,-3.87 -3.13,-7 -7,-7zM12,11.5c-1.38,0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5 2.5,1.12 2.5,2.5 -1.12,2.5 -2.5,2.5z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M14,6l-1,-2L5,4v17h2v-7h5l1,2h7L20,6h-6zM18,14h-4l-1,-2L7,12L7,6h5l1,2h5v6z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M8,5v14l11,-7z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
</vector>

View File

@@ -0,0 +1,284 @@
<?xml version="1.0" encoding="utf-8"?>
<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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.CouponFragment">
<androidx.appcompat.widget.AppCompatImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/primaryColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/coupons"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box1"
android:layout_width="match_parent"
android:layout_height="50dp"
app:layout_constraintBottom_toTopOf="@id/Box2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Code"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Waarde"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box2"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FRISDRANKJE20"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Frisdrank"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk2"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box3"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box2"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CHOCOMEL30"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Chocomel"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk3"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box4"
android:layout_width="match_parent"
android:layout_height="50dp"
app:layout_constraintBottom_toTopOf="@id/Box5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FRISTI200"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk4"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2x Fristi"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk4"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box5"
android:layout_width="match_parent"
android:layout_height="50dp"
app:layout_constraintBottom_toTopOf="@id/ButtonActivate"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box4"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OLA30"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk5"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Waterijsje"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk5"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/ButtonActivate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/buttonColour"
android:text="Activate"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box5"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primaryColour"
tools:context=".fragments.LocationDetailFragment">
<TextView
android:id="@+id/detail_location_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Locatie detail"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/detail_location_image"
android:layout_width="309dp"
android:layout_height="283dp"
android:layout_marginStart="30dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/detail_location_text"
android:layout_width="309dp"
android:layout_height="283dp"
android:layout_marginEnd="30dp"
android:background="@color/secondaryColour"
android:text="Detail tekst"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_location_name" />
<ImageButton
android:id="@+id/detail_location_back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:backgroundTint="@color/primaryColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/detail_location_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/detail_location_name"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.RouteDetailFragment">
<ImageButton
android:id="@+id/routeDetailBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/routeTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/routeTitle"
app:layout_constraintEnd_toStartOf="@id/routeTitle"
/>
<TextView
android:id="@+id/routeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="250dp"
android:text="titel"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/routeDetailImage"
app:layout_constraintEnd_toStartOf="@+id/routeDetailText"
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/routeDetailImage"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_marginEnd="350dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/routeDetailText"
android:layout_width="0dp"
android:layout_height="10dp"
android:layout_marginStart="50dp"
android:layout_marginEnd="50dp"
android:layout_marginBottom="200dp"
android:text=""
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/routeDetailImage"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/startRouteButton"
android:src="@drawable/ic_baseline_play_arrow_24"
android:backgroundTint="@color/primaryColour"
android:scaleX="5"
android:scaleY="5"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginStart="350dp"
app:layout_constraintBottom_toBottomOf="@+id/startRouteText"
app:layout_constraintEnd_toStartOf="@id/startRouteText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/startRouteText" />
<TextView
android:id="@+id/startRouteText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:text="@string/start_route"
android:textSize="50sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/startRouteButton"
app:layout_constraintTop_toBottomOf="@id/routeDetailImage" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -11,28 +11,18 @@
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/scroller_devider"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<View
android:id="@+id/scroller_devider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
app:layout_constraintBottom_toTopOf="@id/navbar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:showAsAction="always|withText"
android:id="@+id/navbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
app:itemIconTint="@color/primaryColour"
app:itemIconTint="@color/secondaryColour"
app:itemTextColor="@color/primaryColour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -40,6 +30,39 @@
app:menu="@menu/navmenu"
/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topBar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="50dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/fragment_layout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:background="@color/primaryColour"/>
<ImageButton
android:id="@+id/infoButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_baseline_info_24"
android:backgroundTint="@color/primaryColour"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/topBar"
app:layout_constraintBottom_toBottomOf="@id/topBar"
android:tint="@color/secondaryColour"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintStart_toEndOf="@id/infoButton"
app:layout_constraintTop_toTopOf="@id/topBar"
app:layout_constraintBottom_toBottomOf="@id/topBar"
android:text="@string/app_name"
android:textSize="25dp"
android:textColor="@color/secondaryColour"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,284 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.CouponFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<androidx.appcompat.widget.AppCompatImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/primaryColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView" />
</FrameLayout>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/coupons"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box1"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toTopOf="@id/Box2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Code"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Waarde"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box2"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FRISDRANKJE20"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Frisdrank"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk2"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box3"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box2"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="CHOCOMEL30"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Chocomel"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk3"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box4"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toTopOf="@id/Box5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="FRISTI200"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk4"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2x Fristi"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk4"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box5"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toTopOf="@id/ButtonActivate"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box4"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OLA30"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk5"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1x Waterijsje"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk5"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<Button
android:id="@+id/ButtonActivate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/buttonColour"
android:text="Activate"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box5"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5,10 +5,10 @@
android:layout_height="match_parent"
tools:context=".fragments.HomeFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
<org.osmdroid.views.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
android:layout_height="match_parent" />
</FrameLayout>

View File

@@ -1,14 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primaryColour"
tools:context=".fragments.LocationFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
android:id="@+id/location_RV"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="9dp"
android:text="Locations"
android:textSize="20sp"
app:layout_constraintStart_toEndOf="@id/routeBackButton"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<ImageButton
android:id="@+id/routeBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_back_button_24"
android:backgroundTint="@color/buttonColour"
android:text="Back"
android:layout_margin="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/routeBackButton" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primaryColour"
tools:context=".fragments.LocationDetailFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
android:id="@+id/detail_location_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="Locatie detail"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<ImageView
android:id="@+id/detail_location_image"
android:layout_width="357dp"
android:layout_height="196dp"
android:layout_marginTop="30dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_location_name"
tools:src="@tools:sample/avatars" />
<TextView
android:id="@+id/detail_location_text"
android:layout_width="match_parent"
android:layout_margin="20dp"
android:layout_height="wrap_content"
android:background="@color/secondaryColour"
android:text="Detail tekst"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/detail_location_image" />
<ImageButton
android:id="@+id/detail_location_back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_back_button_24"
android:backgroundTint="@color/primaryColour"
app:layout_constraintBottom_toBottomOf="@+id/detail_location_name"
app:layout_constraintEnd_toStartOf="@+id/detail_location_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/detail_location_name" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primaryColour"
tools:context=".fragments.RouteFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<ImageButton
android:id="@+id/routeBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/ic_back_button_24"
android:text="Back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</FrameLayout>
<TextView
android:id="@+id/routeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="9dp"
android:text="titel"
android:textSize="20sp"
app:layout_constraintStart_toEndOf="@id/routeBackButton"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/routeListRV"
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/primaryColour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/routeBackButton" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,81 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.RouteDetailFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<ImageButton
android:id="@+id/routeDetailBackButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="100dp"
android:background="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@id/routeTitle"
app:layout_constraintEnd_toStartOf="@id/routeTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/routeTitle" />
</FrameLayout>
<TextView
android:id="@+id/routeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="titel"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/routeDetailImage"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_margin="40dp"
android:id="@+id/routeDetailImage"
app:layout_constraintTop_toBottomOf="@id/routeDetailBackButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/routeDetailText"
/>
<TextView
android:id="@+id/routeDetailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
android:layout_marginBottom="100dp"
app:layout_constraintBottom_toTopOf="@id/startRouteText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/routeDetailImage" />
<ImageButton
android:id="@+id/startRouteButton"
android:backgroundTint="@color/primaryColour"
android:scaleX="5"
android:scaleY="5"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_margin="20dp"
app:layout_constraintBottom_toBottomOf="@+id/startRouteText"
app:layout_constraintEnd_toStartOf="@+id/startRouteText"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/startRouteText"
android:src="@drawable/ic_baseline_play_arrow_24"
/>
<TextView
android:id="@+id/startRouteText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="@string/start_route"
android:textSize="50sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/startRouteButton"
app:layout_constraintTop_toBottomOf="@id/routeDetailText" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,217 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.SettingsFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<androidx.appcompat.widget.AppCompatImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/primaryColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView" />
</FrameLayout>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/settings"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box1"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toTopOf="@id/Box2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/taal"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<Spinner
android:id="@+id/dropdown_menu_Settings"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk"
app:layout_constraintTop_toTopOf="parent"
android:tooltipText="Taal"
android:spinnerMode="dropdown"/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box2"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/imperiaal_systeem"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk2"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box3"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box2"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/_65_stand"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk3"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box4"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/kleurenblind"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk4"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<androidx.appcompat.widget.SwitchCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk4"
app:layout_constraintTop_toTopOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,14 +1,224 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.StatisticFragment">
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/hello_blank_fragment" />
<androidx.appcompat.widget.AppCompatImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/primaryColour"
android:src="@drawable/ic_back_button_24"
app:layout_constraintBottom_toBottomOf="@+id/textView"
app:layout_constraintEnd_toStartOf="@+id/textView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/textView" />
</FrameLayout>
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/statistieken"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box1"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toTopOf="@id/Box2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/totale_afstand"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" km"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box2"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box1"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/bezochte_locaties"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk2"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GETAL"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk2"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box3"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box2"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/totale_tijd"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk3"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk3"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=" minuten"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk3"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/Box4"
android:layout_width="match_parent"
android:layout_height="70dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/coupons_gespaard"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@id/Balk4"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:id="@+id/Balk4"
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GETAL"
android:textColor="@color/black"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/Balk4"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/secondaryColour"
android:layout_margin="20dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:id="@+id/location_image"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
<TextView
android:id="@+id/location_name"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="location"
android:textSize="20dp"
app:layout_constraintStart_toEndOf="@+id/routeImage" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="50dp"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/secondaryColour"
android:layout_margin="20dp">
<ImageView
android:layout_width="50dp"
android:layout_height="50dp"
android:id="@+id/routeImage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:id="@+id/routeName"
android:text="test text"
android:gravity="center"
android:textSize="20dp"
app:layout_constraintStart_toEndOf="@+id/routeImage"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,25 +4,25 @@
<item
android:id="@+id/locations"
android:title="@string/locations"
android:icon="@drawable/ic_placeholder"
android:icon="@drawable/ic_baseline_outlined_flag_24"
/>
<item
android:id="@+id/routes"
android:title="@string/routes"
android:icon="@drawable/ic_placeholder"
android:icon="@drawable/ic_baseline_location_on_24"
/>
<item
android:id="@+id/statistics"
android:title="@string/statistics"
android:icon="@drawable/ic_placeholder"
android:icon="@drawable/ic_baseline_graphic_eq_24"
/>
<item
android:id="@+id/settings"
android:title="@string/settings"
android:icon="@drawable/ic_placeholder"
android:icon="@drawable/ic_baseline_settings_24"
/>
</menu>

View File

@@ -6,4 +6,15 @@
<string name="routes">Routes</string>
<string name="statistics">Statistieken</string>
<string name="settings">Instellingen</string>
<string name="taal">Taal</string>
<string name="imperiaal_systeem">Imperiaal systeem</string>
<string name="_65_stand">65+ stand</string>
<string name="kleurenblind">Kleurenblind</string>
<string name="statistieken">Statistieken</string>
<string name="totale_afstand">Totale afstand:</string>
<string name="bezochte_locaties">Bezochte locaties:</string>
<string name="totale_tijd">Totale tijd:</string>
<string name="coupons_gespaard">Coupons gespaard:</string>
<string name="coupons">Coupons</string>
<string name="start_route">Start Route</string>
</resources>

View File

@@ -1,6 +1,6 @@
#Tue Dec 08 10:31:45 CET 2020
#Mon Dec 14 14:48:57 CET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip