diff --git a/Sources/app/src/main/java/Popups/PathviewPopup.java b/Sources/app/src/main/java/Popups/PathviewPopup.java index 15667980634de9b26de326b8e730830df9587fac..002e5b94844af472aa71f9b324d34183ca0d6339 100644 --- a/Sources/app/src/main/java/Popups/PathviewPopup.java +++ b/Sources/app/src/main/java/Popups/PathviewPopup.java @@ -3,6 +3,7 @@ package Popups; import android.content.Context; import android.view.LayoutInflater; import android.view.View; +import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; @@ -64,6 +65,13 @@ public class PathviewPopup { showAddPathwayPopup(); }); + p_path.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { + validate_btn.setEnabled(true); + } + public void onNothingSelected(AdapterView<?> adapterView) {} + }); + onCreate.call(this); cancel_btn.setOnClickListener(view -> onCancel.call(this)); diff --git a/Sources/app/src/main/java/Popups/WalkPopup.java b/Sources/app/src/main/java/Popups/WalkPopup.java new file mode 100644 index 0000000000000000000000000000000000000000..59fbbb23a978fe89fa2e76a1d1309a6c991eba45 --- /dev/null +++ b/Sources/app/src/main/java/Popups/WalkPopup.java @@ -0,0 +1,128 @@ +package Popups; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; +import android.widget.TextView; + +import androidx.appcompat.app.AlertDialog; + +import com.furwaz.roomview.R; + +import Common.Callback; +import Structures.PathDoor; +import Structures.PathInfo; +import Structures.PathStairs; +import Structures.PathType; +import Structures.RoomInfo; +import Structures.ZoneInfo; + +public class WalkPopup { + public static final int MODE_NEW = 1; + public static final int MODE_EDIT = 2; + + Context context = null; + RoomInfo room = null; + AlertDialog dialog = null; + Spinner w_zone = null; + Button validate_btn = null; + Button cancel_btn = null; + + public WalkPopup(Context context, RoomInfo room, Callback onCreate, Callback onCancel, Callback onValidate, int mode) { + AlertDialog.Builder builder = new AlertDialog.Builder(context); + dialog = builder.create(); + LayoutInflater factory = LayoutInflater.from(context); + View popup = factory.inflate(R.layout.add_walk_popup, null); + dialog.setView(popup); + + this.context = context; + this.room = room; + + w_zone = popup.findViewById(R.id.walk_zone); + validate_btn = popup.findViewById(R.id.btn_validate_room); + cancel_btn = popup.findViewById(R.id.btn_cancel_room); + + if (mode == MODE_EDIT) { + TextView tv = popup.findViewById(R.id.walk_popup_title); + tv.setText(context.getResources().getString(R.string.edit_walk)); + cancel_btn.setText(context.getResources().getString(R.string.remove)); + validate_btn.setText(context.getResources().getString(R.string.edit)); + } + + dialog.setOnShowListener(dialogInterface -> { + updateZonesList(); + + TextView btn_new_pathway = dialog.findViewById(R.id.new_zone_btn); + btn_new_pathway.setOnClickListener(view -> { + showAddZonePopup(); + }); + + w_zone.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { + validate_btn.setEnabled(true); + } + public void onNothingSelected(AdapterView<?> adapterView) {} + }); + + onCreate.call(this); + + cancel_btn.setOnClickListener(view -> onCancel.call(this)); + validate_btn.setOnClickListener(view -> onValidate.call(this)); + }); + dialog.show(); + } + + public void dismiss() { + dialog.dismiss(); + } + + public void setSelectedZone(ZoneInfo zone) { this.w_zone.setSelection(room.getZones().indexOf(zone)); } + + public ZoneInfo getSelectedZone() { + return room.getZone( w_zone.getSelectedItemPosition() ); + } + + public void show() { + dialog.show(); + } + + protected void updateZonesList() { + String[] str_zones = new String[room.getNbZones()]; + for (int i = 0; i < str_zones.length; i++) + str_zones[i] = room.getZone(i).getName(); + w_zone.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, str_zones)); + if (room.getNbZones() == 0) { + validate_btn.setEnabled(false); + TextView tv_err = dialog.findViewById(R.id.walk_input_error_msg); + tv_err.setText(context.getResources().getString(R.string.no_zones_available)); + } + } + + protected void showAddZonePopup() { + new ZonePopup( + context, + room, + param -> { + ((ZonePopup) param).getInput().setText(""); + return null; + }, + param -> { + ((ZonePopup) param).dismiss(); + return null; + }, + param -> { + ZonePopup popup = ((ZonePopup) param); + String name = popup.getInput().getText().toString(); + room.addZone(new ZoneInfo(name)); + updateZonesList(); + popup.dismiss(); + return null; + }, + ZonePopup.MODE_NEW + ).show(); + } +} diff --git a/Sources/app/src/main/java/Structures/WalkInfo.java b/Sources/app/src/main/java/Structures/WalkInfo.java index 4d07af231718de7976692c66ff2b4e291d9c4ff3..e18612a162063da253c36233e1edf5cb22c582e0 100644 --- a/Sources/app/src/main/java/Structures/WalkInfo.java +++ b/Sources/app/src/main/java/Structures/WalkInfo.java @@ -10,6 +10,11 @@ public class WalkInfo implements Serializable { } + public WalkInfo(ZoneInfo dest, Orientation orient) { + this.setDestination(dest); + this.setOrientation(orient); + } + public ZoneInfo getDestination() { return destination; } diff --git a/Sources/app/src/main/java/com/furwaz/roomview/PhotoActivity.java b/Sources/app/src/main/java/com/furwaz/roomview/PhotoActivity.java index 5b0dc238c5c14ddf93fc8513676abeee819b9c1b..cb82afb2638942e8658fa5b47b75bb752731c244 100644 --- a/Sources/app/src/main/java/com/furwaz/roomview/PhotoActivity.java +++ b/Sources/app/src/main/java/com/furwaz/roomview/PhotoActivity.java @@ -14,6 +14,7 @@ import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.FrameLayout; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; @@ -23,9 +24,11 @@ import java.io.File; import Common.BuildingManager; import Common.ImageManager; +import Popups.WalkPopup; import Structures.BuildingInfo; import Structures.PhotoInfo; import Structures.RoomInfo; +import Structures.WalkInfo; import Structures.ZoneInfo; import Views.CameraPreview; import Views.DoorsSelector; @@ -132,6 +135,13 @@ public class PhotoActivity extends AppCompatActivity implements SensorEventListe setViewMode(MODE_PHOTO); }); + ImageView btn_walk = findViewById(R.id.btn_walk); + btn_walk.setOnClickListener(view -> { + if (zone.getWalk(photo.getOrientation()) != null) + showEditWalkPopup(); + else showAddWalkPopup(); + }); + DoorsSelector selector = findViewById(R.id.door_selector); selector.setRoom(room); selector.setPhoto(photo); @@ -191,4 +201,43 @@ public class PhotoActivity extends AppCompatActivity implements SensorEventListe return false; } } + + protected void showAddWalkPopup() { + new WalkPopup( + this, + room, + param -> null, + param -> { + ((WalkPopup) param).dismiss(); + return null; + }, + param -> { + WalkPopup popup = (WalkPopup) param; + zone.addWalk(new WalkInfo(popup.getSelectedZone(), photo.getOrientation())); + popup.dismiss(); + return null; + }, + WalkPopup.MODE_NEW + ); + } + + protected void showEditWalkPopup() { + new WalkPopup( + this, + room, + param -> null, + param -> { + ((WalkPopup) param).dismiss(); + zone.removeWalk(zone.getWalk(photo.getOrientation())); + return null; + }, + param -> { + WalkPopup popup = (WalkPopup) param; + zone.getWalk(photo.getOrientation()).setDestination(popup.getSelectedZone()); + popup.dismiss(); + return null; + }, + WalkPopup.MODE_EDIT + ); + } } \ No newline at end of file diff --git a/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java b/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java index 061c5aa850c656399f9aff2ae4ad37f7fa30cfc1..d3e69bf2a11221fd07f874714b41ef484b1a6872 100644 --- a/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java +++ b/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java @@ -23,6 +23,7 @@ import Structures.Orientation; import Structures.PathView; import Structures.PhotoInfo; import Structures.RoomInfo; +import Structures.WalkInfo; import Structures.ZoneInfo; import Views.ClickDetector; @@ -148,6 +149,23 @@ public class ZoneView extends AppCompatActivity { return; } + ImageView btn_walk = findViewById(R.id.btn_walk); + LinearLayout walk_btn = findViewById(R.id.walk_btn); + WalkInfo walk = zone.getWalk(this.orient); + if (walk == null) { + walk_btn.setVisibility(View.INVISIBLE); + btn_walk.setVisibility(View.INVISIBLE); + } else { + walk_btn.setVisibility(View.VISIBLE); + btn_walk.setVisibility(View.VISIBLE); + btn_walk.setOnClickListener(view -> { + this.old_zone = this.zone; + this.zone = walk.getDestination(); + updateUI(); + }); + } + + ImageView iv = findViewById(R.id.bitmap_view); iv.setImageBitmap(bm); } diff --git a/Sources/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Sources/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index e1ac80fd1874fa1e03dd9eab3a99bbfc0ca3f672..0000000000000000000000000000000000000000 --- a/Sources/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:aapt="http://schemas.android.com/aapt" - android:width="108dp" - android:height="108dp" - android:viewportWidth="108" - android:viewportHeight="108"> - <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> - <aapt:attr name="android:fillColor"> - <gradient - android:endX="85.84757" - android:endY="92.4963" - android:startX="42.9492" - android:startY="49.59793" - android:type="linear"> - <item - android:color="#44000000" - android:offset="0.0" /> - <item - android:color="#00000000" - android:offset="1.0" /> - </gradient> - </aapt:attr> - </path> - <path - android:fillColor="#FFFFFF" - android:fillType="nonZero" - android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" - android:strokeWidth="1" - android:strokeColor="#00000000" /> -</vector> \ No newline at end of file diff --git a/Sources/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml b/Sources/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml index ffc2083601326ee2f81cd6d54bc1c9e29f63a502..b6c209ced536da78fe95f0c474ea22e7ce11a38e 100644 --- a/Sources/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml +++ b/Sources/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml @@ -1,4 +1,4 @@ -<vector android:height="24dp" android:tint="#FFFFFF" +<vector android:height="24dp" android:tint="@color/slate_50" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <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"/> diff --git a/Sources/app/src/main/res/drawable/ic_baseline_arrow_forward_ios_24.xml b/Sources/app/src/main/res/drawable/ic_baseline_arrow_forward_ios_24.xml index 301c7cd627ebd7f6f1168c9cb644c9780f637742..056f81eedb59987415278bb7779c1bb0407e275f 100644 --- a/Sources/app/src/main/res/drawable/ic_baseline_arrow_forward_ios_24.xml +++ b/Sources/app/src/main/res/drawable/ic_baseline_arrow_forward_ios_24.xml @@ -1,5 +1,5 @@ <vector android:autoMirrored="true" android:height="24dp" - android:tint="#FFFFFF" android:viewportHeight="24" + android:tint="@color/slate_50" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="@android:color/white" android:pathData="M6.23,20.23l1.77,1.77l10,-10l-10,-10l-1.77,1.77l8.23,8.23z"/> </vector> diff --git a/Sources/app/src/main/res/drawable/ic_baseline_directions_24.xml b/Sources/app/src/main/res/drawable/ic_baseline_directions_24.xml index ac19d4784c524aacc1c87de73a4f4b5203b90145..1644b5ca5b9f9050bc8a0ec418f7edda5f99f8a3 100644 --- a/Sources/app/src/main/res/drawable/ic_baseline_directions_24.xml +++ b/Sources/app/src/main/res/drawable/ic_baseline_directions_24.xml @@ -1,4 +1,4 @@ -<vector android:height="24dp" android:tint="#FFFFFF" +<vector android:height="24dp" android:tint="@color/slate_50" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="@android:color/white" android:pathData="M21.71,11.29l-9,-9c-0.39,-0.39 -1.02,-0.39 -1.41,0l-9,9c-0.39,0.39 -0.39,1.02 0,1.41l9,9c0.39,0.39 1.02,0.39 1.41,0l9,-9c0.39,-0.38 0.39,-1.01 0,-1.41zM14,14.5V12h-4v3H8v-4c0,-0.55 0.45,-1 1,-1h5V7.5l3.5,3.5 -3.5,3.5z"/> diff --git a/Sources/app/src/main/res/drawable/ic_baseline_directions_walk_24.xml b/Sources/app/src/main/res/drawable/ic_baseline_directions_walk_24.xml index ded01eb4cedf14b78cf833b3e5b5ed3b0cdc859b..3d456c1bf4d3b89f385de51b2fa7fb68e802adbe 100644 --- a/Sources/app/src/main/res/drawable/ic_baseline_directions_walk_24.xml +++ b/Sources/app/src/main/res/drawable/ic_baseline_directions_walk_24.xml @@ -1,4 +1,4 @@ -<vector android:height="24dp" android:tint="#FFFFFF" +<vector android:height="24dp" android:tint="@color/slate_700" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="@android:color/white" android:pathData="M13.5,5.5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM9.8,8.9L7,23h2.1l1.8,-8 2.1,2v6h2v-7.5l-2.1,-2 0.6,-3C14.8,12 16.8,13 19,13v-2c-1.9,0 -3.5,-1 -4.3,-2.4l-1,-1.6c-0.4,-0.6 -1,-1 -1.7,-1 -0.3,0 -0.5,0.1 -0.8,0.1L6,8.3V13h2V9.6l1.8,-0.7"/> diff --git a/Sources/app/src/main/res/drawable/ic_baseline_location_on_24.xml b/Sources/app/src/main/res/drawable/ic_baseline_location_on_24.xml index e5383d72a6ad6813ce78d283e78b77b61d7969ab..a36ea1ae4b91b3bd073b4a641a3e22f77856dd31 100644 --- a/Sources/app/src/main/res/drawable/ic_baseline_location_on_24.xml +++ b/Sources/app/src/main/res/drawable/ic_baseline_location_on_24.xml @@ -1,4 +1,4 @@ -<vector android:height="24dp" android:tint="#FFFFFF" +<vector android:height="24dp" android:tint="@color/slate_50" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <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"/> diff --git a/Sources/app/src/main/res/drawable/ic_launcher_background.xml b/Sources/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9cbf141911847041df5d7b87f0dd5ef9d4..0000000000000000000000000000000000000000 --- a/Sources/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="108dp" - android:height="108dp" - android:viewportWidth="108" - android:viewportHeight="108"> - <path - android:fillColor="#3DDC84" - android:pathData="M0,0h108v108h-108z" /> - <path - android:fillColor="#00000000" - android:pathData="M9,0L9,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,0L19,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M29,0L29,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M39,0L39,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M49,0L49,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M59,0L59,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M69,0L69,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M79,0L79,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M89,0L89,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M99,0L99,108" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,9L108,9" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,19L108,19" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,29L108,29" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,39L108,39" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,49L108,49" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,59L108,59" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,69L108,69" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,79L108,79" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,89L108,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M0,99L108,99" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,29L89,29" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,39L89,39" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,49L89,49" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,59L89,59" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,69L89,69" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M19,79L89,79" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M29,19L29,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M39,19L39,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M49,19L49,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M59,19L59,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M69,19L69,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> - <path - android:fillColor="#00000000" - android:pathData="M79,19L79,89" - android:strokeWidth="0.8" - android:strokeColor="#33FFFFFF" /> -</vector> diff --git a/Sources/app/src/main/res/drawable/ic_search_white.xml b/Sources/app/src/main/res/drawable/ic_search_white.xml deleted file mode 100644 index abb5e36f3c171015d07015a7f0583fc039026228..0000000000000000000000000000000000000000 --- a/Sources/app/src/main/res/drawable/ic_search_white.xml +++ /dev/null @@ -1,5 +0,0 @@ -<vector android:height="24dp" android:tint="@color/slate_50" - android:viewportHeight="24" android:viewportWidth="24" - android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> - <path android:fillColor="@color/slate_50" android:pathData="M15.5,14h-0.79l-0.28,-0.27c1.2,-1.4 1.82,-3.31 1.48,-5.34 -0.47,-2.78 -2.79,-5 -5.59,-5.34 -4.23,-0.52 -7.79,3.04 -7.27,7.27 0.34,2.8 2.56,5.12 5.34,5.59 2.03,0.34 3.94,-0.28 5.34,-1.48l0.27,0.28v0.79l4.25,4.25c0.41,0.41 1.08,0.41 1.49,0 0.41,-0.41 0.41,-1.08 0,-1.49L15.5,14zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/> -</vector> diff --git a/Sources/app/src/main/res/layout/activity_photo.xml b/Sources/app/src/main/res/layout/activity_photo.xml index 66cd22d809b7e0d792c6ea1d74a906bd373147b7..9987bd8fc63783947a95b2347b4b2cbbb6ea0f1e 100644 --- a/Sources/app/src/main/res/layout/activity_photo.xml +++ b/Sources/app/src/main/res/layout/activity_photo.xml @@ -154,6 +154,7 @@ android:orientation="horizontal" android:padding="8dp"> <ImageView + android:id="@+id/btn_walk" android:layout_width="40dp" android:layout_height="40dp" android:src="@drawable/ic_baseline_directions_walk_24"/> diff --git a/Sources/app/src/main/res/layout/activity_zone_view.xml b/Sources/app/src/main/res/layout/activity_zone_view.xml index 567a03762aaceba933d834aac1c889e72b613ca2..23d644ce77ad40f5e775877137b3196507a88d08 100644 --- a/Sources/app/src/main/res/layout/activity_zone_view.xml +++ b/Sources/app/src/main/res/layout/activity_zone_view.xml @@ -114,6 +114,27 @@ </LinearLayout> </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="horizontal" + android:gravity="center"> + <LinearLayout + android:id="@+id/walk_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/icon_background" + android:orientation="horizontal" + android:padding="8dp"> + <ImageView + android:id="@+id/btn_walk" + android:visibility="visible" + android:layout_width="40dp" + android:layout_height="40dp" + android:src="@drawable/ic_baseline_directions_walk_24"/> + </LinearLayout> + </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" @@ -191,7 +212,7 @@ android:layout_height="0dp" android:visibility="invisible" android:clickable="false" - android:layout_weight="1" /> + android:layout_weight="2" /> </LinearLayout> </FrameLayout> diff --git a/Sources/app/src/main/res/layout/add_walk_popup.xml b/Sources/app/src/main/res/layout/add_walk_popup.xml new file mode 100644 index 0000000000000000000000000000000000000000..296084e97adaf6cebafd0a939ce7232b81d00229 --- /dev/null +++ b/Sources/app/src/main/res/layout/add_walk_popup.xml @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:background="@color/slate_50"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@color/blue_500" + android:layout_marginBottom="20dp"> + + <TextView + android:id="@+id/walk_popup_title" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/slate_200" + android:text="@string/new_walk" + android:textColor="@color/blue_500" + android:textSize="20sp" + android:layout_marginBottom="4dp" + android:textStyle="bold" + android:padding="10dp"/> + </LinearLayout> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/slate_700" + android:textSize="16sp" + android:textStyle="normal" + android:text="@string/walk_zone" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp" + android:paddingTop="10dp" + android:paddingBottom="4dp"/> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@color/blue_500" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp" + android:paddingBottom="4dp"> + <Spinner + android:id="@+id/walk_zone" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/slate_100" + android:textColor="@color/slate_800" + android:textSize="20sp" + android:textStyle="bold"/> + </LinearLayout> + <TextView + android:id="@+id/walk_input_error_msg" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="start" + android:textColor="@color/red_500" + android:textSize="12sp" + android:textStyle="normal" + android:text="" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp"/> + + <TextView + android:id="@+id/new_zone_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="start" + android:background="@drawable/flat_btn" + android:textColor="@color/blue_500" + android:textSize="16sp" + android:textStyle="bold" + android:text="@string/new_zone" + android:paddingEnd="8dp" + android:paddingStart="8dp" + android:paddingTop="4dp" + android:paddingBottom="4dp" + android:layout_marginTop="20dp" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp"/> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginTop="20dp" + android:padding="8dp"> + + <Button + android:id="@+id/btn_cancel_room" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/red_500" + style="@style/Widget.AppCompat.Button.Borderless" + android:text="@string/cancel"/> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="right"> + <Button + android:id="@+id/btn_validate_room" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:backgroundTint="@color/blue_500" + android:text="@string/add"/> + </LinearLayout> + </LinearLayout> + </LinearLayout> +</RelativeLayout> \ No newline at end of file diff --git a/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index eca70cfe52eac1ba66ba280a68ca7be8fcf88a16..4f6b3e161f2ac70f08e371566dfcda705208a5d9 100644 --- a/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@drawable/ic_launcher_background" /> - <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <background android:drawable="@drawable/icon_background" /> + <foreground android:drawable="@drawable/icon_background" /> </adaptive-icon> \ No newline at end of file diff --git a/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml index eca70cfe52eac1ba66ba280a68ca7be8fcf88a16..4f6b3e161f2ac70f08e371566dfcda705208a5d9 100644 --- a/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ b/Sources/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> - <background android:drawable="@drawable/ic_launcher_background" /> - <foreground android:drawable="@drawable/ic_launcher_foreground" /> + <background android:drawable="@drawable/icon_background" /> + <foreground android:drawable="@drawable/icon_background" /> </adaptive-icon> \ No newline at end of file diff --git a/Sources/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/Sources/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index c209e78ecd372343283f4157dcfd918ec5165bb3..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/Sources/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/Sources/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 4f0f1d64e58ba64d180ce43ee13bf9a17835fbca..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Sources/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp deleted file mode 100644 index 62b611da081676d42f6c3f78a2c91e7bcedddedb..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 948a3070fe34c611c42c0d3ad3013a0dce358be0..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 1b9a6956b3acdc11f40ce2bb3f6efbd845cc243f..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp deleted file mode 100644 index 28d4b77f9f036a47549d47db79c16788749dca10..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9287f5083623b375139afb391af71cc533a7dd37..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp deleted file mode 100644 index aa7d6427e6fa1074b79ccd52ef67ac15c5637e85..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ diff --git a/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9126ae37cbc3587421d6889eadd1d91fbf1994d4..0000000000000000000000000000000000000000 Binary files a/Sources/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/Sources/app/src/main/res/values-fr/strings.xml b/Sources/app/src/main/res/values-fr/strings.xml index a25ddb4671f6a6fc6e18ed798f190cc4533760bc..f5e5ef51b2fbcfe944b30d81179d6c28269bb9c4 100644 --- a/Sources/app/src/main/res/values-fr/strings.xml +++ b/Sources/app/src/main/res/values-fr/strings.xml @@ -76,4 +76,9 @@ <string name="no_photos_taken">Désolé, aucune photo n\'a été prise pour cette pièce</string> <string name="back">Retour</string> <string name="no_photos_yet">Désolé, aucune photo n\'a encore été prise pour cette vue</string> + <string name="orientation">Orientation</string> + <string name="new_walk">Nouveau déplacement</string> + <string name="walk_zone">Zone correspondante</string> + <string name="edit_walk">Modifier le déplacement</string> + <string name="no_zones_available">Aucune zone disponible</string> </resources> \ No newline at end of file diff --git a/Sources/app/src/main/res/values/strings.xml b/Sources/app/src/main/res/values/strings.xml index d19e894d5ff309ff376145e9059974d47a308ad1..4c458fa10012dd9e9d25f10164b706cfbcefbd33 100644 --- a/Sources/app/src/main/res/values/strings.xml +++ b/Sources/app/src/main/res/values/strings.xml @@ -77,4 +77,8 @@ <string name="back">Back</string> <string name="no_photos_yet">Sorry, no photo has been taken for this view yet</string> <string name="orientation">Orientation</string> + <string name="new_walk">New movement</string> + <string name="walk_zone">Corresponding zone</string> + <string name="edit_walk">Edit movement</string> + <string name="no_zones_available">No zones available</string> </resources> \ No newline at end of file