diff --git a/Sources/app/src/main/AndroidManifest.xml b/Sources/app/src/main/AndroidManifest.xml index 99e601ea60a604d60ad623a8c52eb1de7ebce73f..7d181348b389f6fda2e414f999f2936bb927f3e5 100644 --- a/Sources/app/src/main/AndroidManifest.xml +++ b/Sources/app/src/main/AndroidManifest.xml @@ -22,6 +22,9 @@ android:supportsRtl="true" android:theme="@style/Theme.RoomView" tools:targetApi="31"> + <activity + android:name=".ZoneView" + android:exported="false" /> <activity android:name=".BuildingView" android:exported="false" /> diff --git a/Sources/app/src/main/java/Common/Coord.java b/Sources/app/src/main/java/Common/Coord.java new file mode 100644 index 0000000000000000000000000000000000000000..1479617596838025ac6657e8aba8cd7705958104 --- /dev/null +++ b/Sources/app/src/main/java/Common/Coord.java @@ -0,0 +1,33 @@ +package Common; + +import android.view.View; + +public class Coord { + private float x, y; + public Coord() { } + public Coord(float x, float y) { this.x = x; this.y = y; } + public float getY() { return y; } + public float getX() { return x; } + public float distance(Coord c) { + return (float) Math.sqrt( Math.pow(c.getX() - this.getX(), 2) + Math.pow(c.getY() - this.getY(), 2) ); + } + + + public Coord getRelativeCoord(View v) { + float width = v.getWidth(); + float height = v.getHeight(); + return new Coord( + this.getX() / width, + this.getY() / height + ); + } + + public Coord getAbsoluteCoord(View v) { + float width = v.getWidth(); + float height = v.getHeight(); + return new Coord( + this.getX() * width, + this.getY() * height + ); + } +} \ No newline at end of file diff --git a/Sources/app/src/main/java/Popups/GotoPopup.java b/Sources/app/src/main/java/Popups/GotoPopup.java new file mode 100644 index 0000000000000000000000000000000000000000..94dc018e0f7c96181b6b0bf0059e834e53bd94e8 --- /dev/null +++ b/Sources/app/src/main/java/Popups/GotoPopup.java @@ -0,0 +1,100 @@ +package Popups; + +import android.content.Context; +import android.content.Intent; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.ListView; +import android.widget.SearchView; +import android.widget.Spinner; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.appcompat.app.AlertDialog; + +import com.furwaz.roomview.BuildingActivity; +import com.furwaz.roomview.R; +import com.furwaz.roomview.RoomActivity; +import com.furwaz.roomview.ZoneView; + +import java.util.ArrayList; +import java.util.List; + +import Common.BuildingManager; +import Common.Callback; +import Structures.BuildingInfo; +import Structures.Orientation; +import Structures.RoomInfo; +import Structures.ZoneInfo; + +public class GotoPopup { + Context context = null; + AlertDialog dialog = null; + ListView room_list = null; + Button validate_btn = null; + Button cancel_btn = null; + SearchView room_search = null; + BuildingInfo building = null; + List<RoomInfo> validRooms = new ArrayList<>(); + + public GotoPopup(Context context, BuildingInfo building) { + AlertDialog.Builder builder = new AlertDialog.Builder(context); + dialog = builder.create(); + LayoutInflater factory = LayoutInflater.from(context); + View popup = factory.inflate(R.layout.popup_goto, null); + dialog.setView(popup); + + this.context = context; + this.building = building; + + dialog.setOnShowListener(dialogInterface -> { + room_list = popup.findViewById(R.id.room_list); + room_search = popup.findViewById(R.id.room_search); + validate_btn = popup.findViewById(R.id.btn_validate_room); + cancel_btn = popup.findViewById(R.id.btn_cancel_room); + + updateList(""); + room_search.setOnQueryTextListener(new SearchView.OnQueryTextListener() { + public boolean onQueryTextSubmit(String s) { return true; } + + public boolean onQueryTextChange(String s) { + updateList(s); + return true; + } + }); + + room_list.setOnItemClickListener((adapterView, view, i, l) -> { + Intent intent = new Intent(context, ZoneView.class); + intent.putExtra("building", BuildingManager.getBuildings().indexOf(building)); + intent.putExtra("room", building.getRooms().indexOf(validRooms.get(i))); + intent.putExtra("zone", -1); + context.startActivity(intent); + this.dismiss(); + }); + + cancel_btn.setOnClickListener(view -> dismiss()); + }); + dialog.show(); + } + + public void dismiss() { + dialog.dismiss(); + } + + public void show() { + dialog.show(); + } + + protected void updateList(String query) { + validRooms.clear(); + for (RoomInfo r : building.getRooms()) { + if (r.getName().replaceAll(" ", "").contains(query)) + validRooms.add(r); + } + String[] str_rooms = new String[validRooms.size()]; + for (int i = 0; i < str_rooms.length; i++) str_rooms[i] = validRooms.get(i).getName(); + room_list.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, str_rooms)); + } +} diff --git a/Sources/app/src/main/java/Popups/PathviewPopup.java b/Sources/app/src/main/java/Popups/PathviewPopup.java index ba1cbfcc1c4d9183aa1266fa30b16b7aa9236dd2..15667980634de9b26de326b8e730830df9587fac 100644 --- a/Sources/app/src/main/java/Popups/PathviewPopup.java +++ b/Sources/app/src/main/java/Popups/PathviewPopup.java @@ -17,7 +17,11 @@ import java.util.List; import Common.Callback; import Structures.Orientation; +import Structures.PathDoor; import Structures.PathInfo; +import Structures.PathStairs; +import Structures.PathType; +import Structures.PathView; import Structures.RoomInfo; import Structures.ZoneInfo; @@ -42,17 +46,25 @@ public class PathviewPopup { this.context = context; this.room = room; + p_path = popup.findViewById(R.id.pathview_path); + 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.pathview_popup_title); + tv.setText(context.getResources().getString(R.string.edit_pathview)); + validate_btn.setText(context.getResources().getString(R.string.edit)); + } + dialog.setOnShowListener(dialogInterface -> { - p_path = popup.findViewById(R.id.pathview_path); - validate_btn = popup.findViewById(R.id.btn_validate_room); - cancel_btn = popup.findViewById(R.id.btn_cancel_room); + updatePathwaysList(); - onCreate.call(this); + TextView btn_new_pathway = dialog.findViewById(R.id.new_pathway_btn); + btn_new_pathway.setOnClickListener(view -> { + showAddPathwayPopup(); + }); - String[] str_orients = new String[room.getPaths().size()]; - for (int i = 0; i < str_orients.length; i++) - str_orients[i] = room.getPath(i).getName(); - p_path.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, str_orients)); + onCreate.call(this); cancel_btn.setOnClickListener(view -> onCancel.call(this)); validate_btn.setOnClickListener(view -> onValidate.call(this)); @@ -64,6 +76,8 @@ public class PathviewPopup { dialog.dismiss(); } + public void setSelectedPath(PathInfo path) { this.p_path.setSelection(room.getPaths().indexOf(path)); } + public PathInfo getSelectedPath() { return room.getPath( p_path.getSelectedItemPosition() ); } @@ -71,4 +85,45 @@ public class PathviewPopup { public void show() { dialog.show(); } + + protected void updatePathwaysList() { + String[] str_orients = new String[room.getPaths().size()]; + for (int i = 0; i < str_orients.length; i++) + str_orients[i] = room.getPath(i).getName(); + p_path.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, str_orients)); + if (room.getPaths().size() == 0) { + validate_btn.setEnabled(false); + TextView tv_err = dialog.findViewById(R.id.pathview_input_error_msg); + tv_err.setText(context.getResources().getString(R.string.no_pathways_available)); + } + } + + protected void showAddPathwayPopup() { + new PathwayPopup( + context, + room.getBuilding(), + room, + param -> { + ((PathwayPopup) param).getInput().setText(""); + return null; + }, + param -> { + ((PathwayPopup) param).dismiss(); + return null; + }, + param -> { + PathwayPopup popup = ((PathwayPopup) param); + String name = popup.getInput().getText().toString(); + if (popup.getSelectedType() == PathType.DOOR) { + room.addPath(new PathDoor(name, popup.getUpDestination())); + } else { + room.addPath(new PathStairs(name, popup.getUpDestination(), popup.getDownDestination())); + } + updatePathwaysList(); + popup.dismiss(); + return null; + }, + ZonePopup.MODE_NEW + ).show(); + } } diff --git a/Sources/app/src/main/java/Popups/PathwayPopup.java b/Sources/app/src/main/java/Popups/PathwayPopup.java index ddfd57947b8612e3fe55bd0518a5d9d9d28ad585..d47d334fb4f97ee47dcc6aa298bf2f64f26fd18d 100644 --- a/Sources/app/src/main/java/Popups/PathwayPopup.java +++ b/Sources/app/src/main/java/Popups/PathwayPopup.java @@ -14,6 +14,7 @@ import android.widget.TextView; import androidx.appcompat.app.AlertDialog; +import com.furwaz.roomview.BuildingActivity; import com.furwaz.roomview.R; import java.util.ArrayList; @@ -40,6 +41,7 @@ public class PathwayPopup { Spinner sp_dest_down = null; BuildingInfo building = null; + Context context = null; public PathwayPopup(Context context, BuildingInfo building, RoomInfo room, Callback onCreate, Callback onCancel, Callback onValidate, int mode) { AlertDialog.Builder builder = new AlertDialog.Builder(context); @@ -49,6 +51,7 @@ public class PathwayPopup { dialog.setView(popup); this.building = building; + this.context = context; PATHWAY_DOOR = context.getResources().getString(R.string.door); PATHWAY_STAIRS = context.getResources().getString(R.string.stairs); @@ -88,15 +91,7 @@ public class PathwayPopup { sp_dest_up = dialog.findViewById(R.id.pathway_dest_up); sp_dest_down = dialog.findViewById(R.id.pathway_dest_down); - List<String> names = new ArrayList<>(); - names.add("<"+context.getResources().getString(R.string.none)+">"); - for(RoomInfo r : building.getRooms()) names.add(r.getName()); - - String[] sp_dest_items = new String[names.size()]; - for (int i = 0; i < names.size(); i++) sp_dest_items[i] = names.get(i); - - sp_dest_up.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, sp_dest_items)); - sp_dest_down.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, sp_dest_items)); + updateRoomLists(); sp_type.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { @@ -114,7 +109,12 @@ public class PathwayPopup { public void onNothingSelected(AdapterView<?> adapterView) {} }); - cancel_btn.setOnClickListener(view -> onValidate.call(this)); + TextView btn_new_room = dialog.findViewById(R.id.new_room_btn); + btn_new_room.setOnClickListener(view -> { + showAddRoomPopup(); + }); + + cancel_btn.setOnClickListener(view -> onCancel.call(this)); validate_btn.setOnClickListener(view -> onValidate.call(this)); }); dialog.show(); @@ -145,4 +145,39 @@ public class PathwayPopup { public void show() { dialog.show(); } + + protected void updateRoomLists() { + List<String> names = new ArrayList<>(); + names.add("<"+context.getResources().getString(R.string.none)+">"); + for(RoomInfo r : building.getRooms()) names.add(r.getName()); + + String[] sp_dest_items = new String[names.size()]; + for (int i = 0; i < names.size(); i++) sp_dest_items[i] = names.get(i); + + sp_dest_up.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, sp_dest_items)); + sp_dest_down.setAdapter(new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, sp_dest_items)); + } + + protected void showAddRoomPopup() { + new RoomPopup( + context, + building, + param -> { + ((RoomPopup) param).getInput().setText(""); + return null; + }, + param -> { + ((RoomPopup) param).dismiss(); + return null; + }, + param -> { + RoomPopup popup = ((RoomPopup) param); + building.addRoom(new RoomInfo(popup.getInput().getText().toString())); + updateRoomLists(); + popup.dismiss(); + return null; + }, + RoomPopup.MODE_NEW + ).show(); + } } diff --git a/Sources/app/src/main/java/Views/ClickDetector.java b/Sources/app/src/main/java/Views/ClickDetector.java new file mode 100644 index 0000000000000000000000000000000000000000..c21cf8f5b5665e4967f8962e8645b75ff9c13747 --- /dev/null +++ b/Sources/app/src/main/java/Views/ClickDetector.java @@ -0,0 +1,46 @@ +package Views; + +import android.content.Context; +import android.graphics.Canvas; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.widget.Toast; + +import Common.Callback; +import Common.Coord; + +public class ClickDetector extends View { + Callback cb = null; + + protected void init() { + setOnTouchListener(this::touchListener); + } + + public ClickDetector(Context context) { + super(context); + this.init(); + } + + public ClickDetector(Context context, AttributeSet attrs) { + super(context, attrs); + this.init(); + } + + public void setOnClickCallback(Callback c) { + this.cb = c; + } + + protected boolean touchListener(View v, MotionEvent ev) { + if (ev.getPointerCount() != 1) return true; + if (ev.getAction() != MotionEvent.ACTION_DOWN) return true; + if (this.cb == null) return true; + this.cb.call(new Coord(ev.getX(), ev.getY()).getRelativeCoord(this)); + return true; + } + + @Override + protected void onDraw(Canvas canvas) { + super.onDraw(canvas); + } +} diff --git a/Sources/app/src/main/java/Views/DoorsSelector.java b/Sources/app/src/main/java/Views/DoorsSelector.java index d504a4de7e5a15f6240ee98c2e39de7621ad4b6b..cae28f57639bba1b3ec01a7db37d0ab6bff6608c 100644 --- a/Sources/app/src/main/java/Views/DoorsSelector.java +++ b/Sources/app/src/main/java/Views/DoorsSelector.java @@ -6,35 +6,21 @@ import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.util.AttributeSet; -import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.Toast; import com.furwaz.roomview.R; -import java.sql.Array; import java.util.ArrayList; import java.util.List; +import Common.Coord; import Popups.PathviewPopup; import Popups.PhotoPopup; -import Structures.Orientation; import Structures.PathView; import Structures.PhotoInfo; import Structures.RoomInfo; -import Structures.ZoneInfo; - -final class Coord { - private float x, y; - public Coord() { } - public Coord(float x, float y) { this.x = x; this.y = y; } - public float getY() { return y; } - public float getX() { return x; } - public float distance(Coord c) { - return (float) Math.sqrt( Math.pow(c.getX() - this.getX(), 2) + Math.pow(c.getY() - this.getY(), 2) ); - } -} public class DoorsSelector extends View { RoomInfo room = null; @@ -144,12 +130,19 @@ public class DoorsSelector extends View { } protected void propagateClick(Coord c) { - for(int i = 0; i < btns.size(); i++) { - RectF r = btns.get(i); - if (r.contains(c.getX(), c.getY())) { - photo.removePathView(photo.getPathView(i)); - btns.remove(i); - invalidate(); + List<PathView> pathviews = photo.getPathViews(); + for(int i = 0; i < pathviews.size(); i++) { + PathView view = pathviews.get(i); + Coord rc = c.getRelativeCoord(this); + if (view.getRect().contains(rc.getX(), rc.getY())) { + RectF r = btns.get(i); + if (r.contains(c.getX(), c.getY())) { + photo.removePathView(photo.getPathView(i)); + btns.remove(i); + invalidate(); + } else { + showEditPathviewPopup(i); + } break; } } @@ -159,10 +152,10 @@ public class DoorsSelector extends View { if (ev.getPointerCount() != 1) return true; if (ev.getAction() == MotionEvent.ACTION_DOWN) { - startTouchPoint = getRelativeCoord(new Coord(ev.getX(), ev.getY())); + startTouchPoint = new Coord(ev.getX(), ev.getY()).getRelativeCoord(this); } if (ev.getAction() == MotionEvent.ACTION_MOVE) { - endTouchPoint = getRelativeCoord(new Coord(ev.getX(), ev.getY())); + endTouchPoint = new Coord(ev.getX(), ev.getY()).getRelativeCoord(this); editedRect = new RectF( startTouchPoint.getX(), startTouchPoint.getY(), @@ -171,18 +164,18 @@ public class DoorsSelector extends View { ); } if (ev.getAction() == MotionEvent.ACTION_UP) { - endTouchPoint = getRelativeCoord(new Coord(ev.getX(), ev.getY())); - int distance = (int) getAbsoluteCoord(startTouchPoint).distance(getAbsoluteCoord(endTouchPoint)); + endTouchPoint = new Coord(ev.getX(), ev.getY()).getRelativeCoord(this); + int distance = (int) startTouchPoint.getAbsoluteCoord(this).distance(endTouchPoint.getAbsoluteCoord(this)); if (distance > 100) { - boolean isXvalid = Math.abs(getAbsoluteCoord(startTouchPoint).getX() - getAbsoluteCoord(endTouchPoint).getX()) > 150; - boolean isYvalid = Math.abs(getAbsoluteCoord(startTouchPoint).getY() - getAbsoluteCoord(endTouchPoint).getY()) > 80; + boolean isXvalid = Math.abs(startTouchPoint.getAbsoluteCoord(this).getX() - endTouchPoint.getAbsoluteCoord(this).getX()) > 150; + boolean isYvalid = Math.abs(startTouchPoint.getAbsoluteCoord(this).getY() - endTouchPoint.getAbsoluteCoord(this).getY()) > 80; if (!isXvalid || !isYvalid) { Toast.makeText(getContext(), getResources().getString(R.string.door_too_small), Toast.LENGTH_SHORT).show(); } else if (editedRect != null) { showAddDoorPopup(); } } else { - propagateClick(getAbsoluteCoord(endTouchPoint)); + propagateClick(endTouchPoint.getAbsoluteCoord(this)); } editedRect = null; endTouchPoint = null; @@ -192,28 +185,6 @@ public class DoorsSelector extends View { return true; } - protected Coord getRelativeCoord(Coord c) { - if (c == null) return null; - float width = getWidth(); - float height = getHeight(); - float pos_x = getX(); - float pos_y = getY(); - return new Coord( - (c.getX() - pos_x) / width, - (c.getY() - pos_y) / height - ); - } - - protected Coord getAbsoluteCoord(Coord c) { - if (c == null) return null; - float width = getWidth(); - float height = getHeight(); - return new Coord( - c.getX() * width, - c.getY() * height - ); - } - public void setRoom(RoomInfo room) { this.room = room; } @@ -247,4 +218,28 @@ public class DoorsSelector extends View { PhotoPopup.MODE_NEW ).show(); } + + protected void showEditPathviewPopup(int index) { + PathView pv = photo.getPathView(index); + new PathviewPopup( + getContext(), + room, + param -> { + ((PathviewPopup) param).setSelectedPath(pv.getPath()); + return null; + }, + param -> { + ((PathviewPopup) param).dismiss(); + return null; + }, + param -> { + PathviewPopup popup = (PathviewPopup) param; + pv.setPath(popup.getSelectedPath()); + popup.dismiss(); + invalidate(); + return null; + }, + PhotoPopup.MODE_EDIT + ).show(); + } } diff --git a/Sources/app/src/main/java/com/furwaz/roomview/BuildingView.java b/Sources/app/src/main/java/com/furwaz/roomview/BuildingView.java index 8548589d2bbdb89326d5868c5777cc3cedda1449..592401a164a881dcb32a5769962f7ca232f04f9d 100644 --- a/Sources/app/src/main/java/com/furwaz/roomview/BuildingView.java +++ b/Sources/app/src/main/java/com/furwaz/roomview/BuildingView.java @@ -3,12 +3,15 @@ package com.furwaz.roomview; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; +import android.widget.LinearLayout; import android.widget.TextView; import Common.BuildingManager; +import Popups.GotoPopup; import Structures.BuildingInfo; public class BuildingView extends AppCompatActivity { + BuildingInfo building = null; @Override protected void onCreate(Bundle savedInstanceState) { @@ -17,9 +20,28 @@ public class BuildingView extends AppCompatActivity { Bundle extras = getIntent().getExtras(); int building_index = extras.getInt("building"); - BuildingInfo building = BuildingManager.getBuilding(building_index); + building = BuildingManager.getBuilding(building_index); TextView b_name = findViewById(R.id.building_name); b_name.setText(building.getName()); + + LinearLayout tile_goto = findViewById(R.id.tile_goto); + LinearLayout tile_directions = findViewById(R.id.tile_directions); + + tile_goto.setOnClickListener(view -> { + showGotoPopup(); + }); + + tile_directions.setOnClickListener(view -> { + showDirectionsPopup(); + }); + } + + protected void showGotoPopup() { + new GotoPopup(this, building).show(); + } + + protected void showDirectionsPopup() { + } } \ No newline at end of file diff --git a/Sources/app/src/main/java/com/furwaz/roomview/RoomActivity.java b/Sources/app/src/main/java/com/furwaz/roomview/RoomActivity.java index 3bb08feb40fecfcfdfafe4b31f0e4f3ea82b051c..e9a71ac88932bf3ab279b90ebd65e3444ee20c31 100644 --- a/Sources/app/src/main/java/com/furwaz/roomview/RoomActivity.java +++ b/Sources/app/src/main/java/com/furwaz/roomview/RoomActivity.java @@ -276,10 +276,12 @@ public class RoomActivity extends AppCompatActivity { param -> { PathwayPopup popup = ((PathwayPopup) param); String name = popup.getInput().getText().toString(); - if (popup.getSelectedType() == PathType.DOOR) { - room.addPath(new PathDoor(name, popup.getUpDestination())); - } else { - room.addPath(new PathStairs(name, popup.getUpDestination(), popup.getDownDestination())); + if (name != "") { + if (popup.getSelectedType() == PathType.DOOR) { + room.addPath(new PathDoor(name, popup.getUpDestination())); + } else { + room.addPath(new PathStairs(name, popup.getUpDestination(), popup.getDownDestination())); + } } pathways_adapter.setData(room.getPaths()); popup.dismiss(); diff --git a/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java b/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java new file mode 100644 index 0000000000000000000000000000000000000000..061c5aa850c656399f9aff2ae4ad37f7fa30cfc1 --- /dev/null +++ b/Sources/app/src/main/java/com/furwaz/roomview/ZoneView.java @@ -0,0 +1,221 @@ +package com.furwaz.roomview; + +import androidx.appcompat.app.AppCompatActivity; + +import android.annotation.SuppressLint; +import android.content.Intent; +import android.graphics.Bitmap; +import android.os.Bundle; +import android.util.Log; +import android.view.MotionEvent; +import android.view.View; +import android.widget.Button; +import android.widget.ImageButton; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; +import android.widget.Toast; + +import Common.BuildingManager; +import Common.Coord; +import Structures.BuildingInfo; +import Structures.Orientation; +import Structures.PathView; +import Structures.PhotoInfo; +import Structures.RoomInfo; +import Structures.ZoneInfo; +import Views.ClickDetector; + +public class ZoneView extends AppCompatActivity { + int building_index = 0; + int room_index = 0; + int zone_index = 0; + + BuildingInfo building = null; + RoomInfo room = null; + ZoneInfo zone = null; + ZoneInfo old_zone = null; + PhotoInfo photo = null; + + Orientation orient = Orientation.NORTH; + + protected String stringifyOrientation(Orientation orient) { + int stringID = -1; + switch (orient) { + case EST: stringID = R.string.est; break; + case NORTH: stringID = R.string.north; break; + case SOUTH: stringID = R.string.south; break; + case WEST: stringID = R.string.west; break; + } + return getResources().getString(stringID); + } + + protected Orientation getLeft(Orientation o) { + switch (orient) { + case EST: return Orientation.SOUTH; + case NORTH: return Orientation.EST; + case SOUTH: return Orientation.WEST; + case WEST: return Orientation.NORTH; + } + return Orientation.NORTH; + } + + protected Orientation getRight(Orientation o) { + switch (orient) { + case EST: return Orientation.NORTH; + case NORTH: return Orientation.WEST; + case SOUTH: return Orientation.EST; + case WEST: return Orientation.SOUTH; + } + return Orientation.NORTH; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_zone_view); + + Bundle extras = getIntent().getExtras(); + building_index = extras.getInt("building"); + room_index = extras.getInt("room"); + zone_index = extras.getInt("zone"); + if (zone_index == -1) { zone_index = 0; } + + building = BuildingManager.getBuilding(building_index); + room = building.getRoom(room_index); + if (room.getNbZones() > 0) { + zone = room.getZone(zone_index); + } else { + zone = null; + } + + ImageButton btn_l = findViewById(R.id.btn_turn_l); + ImageButton btn_r = findViewById(R.id.btn_turn_r); + + btn_l.setOnClickListener(view -> { + this.orient = getLeft(this.orient); + this.updateUI(); + }); + btn_r.setOnClickListener(view -> { + this.orient = getRight(this.orient); + this.updateUI(); + }); + + ClickDetector bitmap_zone = findViewById(R.id.bitmap_zone); + bitmap_zone.setOnClickCallback(param -> { + Coord c = (Coord) param; + this.onClickAt(c); + return null; + }); + } + + @Override + protected void onResume() { + super.onResume(); + updateUI(); + } + + protected void updateUI() { + TextView tv_orient = findViewById(R.id.orient_text); + TextView tv_room = findViewById(R.id.room_name); + TextView tv_zone = findViewById(R.id.zone_name); + + tv_orient.setText(getResources().getString(R.string.orientation)+": "+stringifyOrientation(this.orient)); + tv_room.setText(room == null? "": room.getName()); + tv_zone.setText(zone == null? "": zone.getName()); + + hideErrorLayout(); + + if (zone == null) { + showErrorLayout(R.string.no_photos, R.string.no_photos_taken); + return; + } + + if (zone.getPhotos().size() == 0) { + showErrorLayout(R.string.no_photos, R.string.no_photos_taken); + return; + } + + photo = zone.getPhoto(this.orient); + if (photo == null) { + showErrorLayout(R.string.no_photos, R.string.no_photos_yet); + return; + } + + Bitmap bm = photo.getBitmap(); + if (bm == null) { + showErrorLayout(R.string.no_photos, R.string.no_photos_yet); + return; + } + + ImageView iv = findViewById(R.id.bitmap_view); + iv.setImageBitmap(bm); + } + + protected void showErrorLayout(int title, int description) { + ClickDetector bitmap_zone = findViewById(R.id.bitmap_zone); + ImageView bitmap_view = findViewById(R.id.bitmap_view); + bitmap_zone.setVisibility(View.GONE); + bitmap_view.setVisibility(View.GONE); + + LinearLayout error_layout = findViewById(R.id.error_layout); + TextView tv_titre = findViewById(R.id.error_title); + TextView tv_desc = findViewById(R.id.error_desc); + + tv_titre.setText(getResources().getString(title)); + tv_desc.setText(getResources().getString(description)); + + error_layout.setVisibility(View.VISIBLE); + Button btn_back = findViewById(R.id.back_btn); + btn_back.setOnClickListener(view -> { + if (this.old_zone == null) finish(); + else { + this.zone = old_zone; + this.room = this.zone.getRoom(); + this.updateUI(); + } + }); + + Button btn_edit = findViewById(R.id.edit_btn); + btn_edit.setOnClickListener(view -> { + Intent intent = new Intent(this, ZoneActivity.class); + intent.putExtra("building", building_index); + intent.putExtra("room", room_index); + intent.putExtra("zone", zone_index); + startActivity(intent); + }); + } + + protected void hideErrorLayout() { + ClickDetector bitmap_zone = findViewById(R.id.bitmap_zone); + ImageView bitmap_view = findViewById(R.id.bitmap_view); + bitmap_zone.setVisibility(View.VISIBLE); + bitmap_view.setVisibility(View.VISIBLE); + + LinearLayout error_layout = findViewById(R.id.error_layout); + error_layout.setVisibility(View.GONE); + } + + protected void onClickAt(Coord c) { + if (photo == null) return; + for (PathView pv : photo.getPathViews()) { + if (pv.getRect().contains(c.getX(), c.getY())) { + RoomInfo dest = pv.getPath().getDestination(); + if (dest == null) { + Toast.makeText(this, "Your can't go here.\nThis pathway is not defined yet.", Toast.LENGTH_SHORT).show(); + return; + } + if (dest.getNbZones() == 0) { + Toast.makeText(this, "Your can't go here.\nThis room doesn't have any zone or photos yet.", Toast.LENGTH_SHORT).show(); + return; + } + ZoneInfo new_zone = dest.getZone(0); + old_zone = this.zone; + this.room = dest; + this.zone = new_zone; + this.updateUI(); + return; + } + } + } +} \ No newline at end of file diff --git a/Sources/app/src/main/res/drawable/flat_btn.xml b/Sources/app/src/main/res/drawable/flat_btn.xml new file mode 100644 index 0000000000000000000000000000000000000000..9937e57cf4212e3d84774655fd7e8e2468ad256d --- /dev/null +++ b/Sources/app/src/main/res/drawable/flat_btn.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/blue_100"/> + <stroke android:width="1dp" android:color="@color/blue_200" /> + <corners android:radius="4dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> +</shape> \ 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 new file mode 100644 index 0000000000000000000000000000000000000000..ffc2083601326ee2f81cd6d54bc1c9e29f63a502 --- /dev/null +++ b/Sources/app/src/main/res/drawable/ic_baseline_arrow_back_ios_new_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + 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"/> +</vector> 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 new file mode 100644 index 0000000000000000000000000000000000000000..301c7cd627ebd7f6f1168c9cb644c9780f637742 --- /dev/null +++ b/Sources/app/src/main/res/drawable/ic_baseline_arrow_forward_ios_24.xml @@ -0,0 +1,5 @@ +<vector android:autoMirrored="true" android:height="24dp" + android:tint="#FFFFFF" 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/info_tile_bg.xml b/Sources/app/src/main/res/drawable/info_tile_bg.xml new file mode 100644 index 0000000000000000000000000000000000000000..4b70e66b9d751615c4cc737843e48f440be17c4c --- /dev/null +++ b/Sources/app/src/main/res/drawable/info_tile_bg.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <solid android:color="@color/slate_100"/> + <stroke android:width="2dp" android:color="@color/slate_200" /> + <corners android:radius="4dp"/> + <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> +</shape> \ No newline at end of file diff --git a/Sources/app/src/main/res/layout/activity_building_view.xml b/Sources/app/src/main/res/layout/activity_building_view.xml index a8cb70983455506bcebbb8b8cc964d2770a1c2d5..af1f39a0e0236b0257c8519da588ecf26242efe6 100644 --- a/Sources/app/src/main/res/layout/activity_building_view.xml +++ b/Sources/app/src/main/res/layout/activity_building_view.xml @@ -35,7 +35,6 @@ android:background="@color/blue_500" android:orientation="vertical"> <LinearLayout - android:id="@+id/no_room_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" @@ -63,20 +62,24 @@ android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout + android:id="@+id/tile_directions" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:background="@drawable/action_tile" android:padding="8dp" android:orientation="vertical"> - <ImageButton + <ImageView android:layout_width="60dp" android:layout_height="60dp" + android:padding="10dp" + android:clickable="false" android:src="@drawable/ic_baseline_directions_24" android:background="@drawable/action_bg"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:clickable="false" android:textStyle="bold" android:paddingTop="8dp" android:textColor="@color/blue_500" @@ -90,20 +93,24 @@ android:layout_height="wrap_content" android:orientation="vertical"> <LinearLayout + android:id="@+id/tile_goto" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:background="@drawable/action_tile" android:padding="8dp" android:orientation="vertical"> - <ImageButton + <ImageView android:layout_width="60dp" android:layout_height="60dp" + android:padding="10dp" + android:clickable="false" android:src="@drawable/ic_baseline_location_on_24" android:background="@drawable/action_bg"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" + android:clickable="false" android:textStyle="bold" android:textColor="@color/blue_500" android:paddingTop="8dp" diff --git a/Sources/app/src/main/res/layout/activity_zone_view.xml b/Sources/app/src/main/res/layout/activity_zone_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..567a03762aaceba933d834aac1c889e72b613ca2 --- /dev/null +++ b/Sources/app/src/main/res/layout/activity_zone_view.xml @@ -0,0 +1,198 @@ +<?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" + tools:context=".ZoneView"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/slate_50" + android:orientation="vertical"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:orientation="vertical" + android:gravity="center"> + <TextView + android:id="@+id/room_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="" + android:textSize="24sp" + android:textStyle="bold" + android:textColor="@color/blue_500"/> + <TextView + android:id="@+id/zone_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="" + android:textSize="18sp" + android:textStyle="normal" + android:textColor="@color/blue_400"/> + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:orientation="horizontal" + android:layout_height="0dp" + android:layout_weight="8"> + <ImageView + android:id="@+id/bitmap_view" + android:visibility="visible" + android:clickable="false" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + <LinearLayout + android:id="@+id/error_layout" + android:visibility="visible" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:gravity="center"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center" + android:background="@drawable/info_tile_bg" + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" + android:padding="10dp"> + <TextView + android:id="@+id/error_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/no_photos" + android:textStyle="bold" + android:textColor="@color/slate_600" + android:textSize="22sp" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp"/> + <TextView + android:id="@+id/error_desc" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/no_photos_taken" + android:gravity="center" + android:textStyle="bold" + android:textColor="@color/slate_400" + android:textSize="18sp" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp"/> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="10dp" + android:layout_marginStart="10dp" + android:orientation="horizontal"> + <Button + android:id="@+id/back_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp" + android:text="@string/back"/> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="end"> + <Button + android:id="@+id/edit_btn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp" + android:backgroundTint="@color/blue_500" + android:text="@string/edit"/> + </LinearLayout> + </LinearLayout> + </LinearLayout> + </LinearLayout> + + </LinearLayout> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" + android:orientation="horizontal" + android:gravity="center"> + <LinearLayout + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="start"> + <ImageButton + android:id="@+id/btn_turn_l" + android:layout_width="50dp" + android:layout_height="50dp" + android:background="@drawable/action_bg" + android:src="@drawable/ic_baseline_arrow_back_ios_new_24" /> + </LinearLayout> + <LinearLayout + android:layout_width="0dp" + android:layout_weight="3" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center"> + <TextView + android:id="@+id/orient_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="" + android:textSize="18sp" + android:textStyle="bold" + android:textColor="@color/blue_500"/> + </LinearLayout> + <LinearLayout + android:layout_width="0dp" + android:layout_weight="1" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="end"> + <ImageButton + android:id="@+id/btn_turn_r" + android:layout_width="50dp" + android:layout_height="50dp" + android:background="@drawable/action_bg" + android:src="@drawable/ic_baseline_arrow_forward_ios_24" /> + </LinearLayout> + </LinearLayout> + </LinearLayout> + + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + <TextView + android:layout_width="match_parent" + android:layout_height="0dp" + android:visibility="invisible" + android:clickable="false" + android:layout_weight="1" /> + <Views.ClickDetector + android:id="@+id/bitmap_zone" + android:layout_weight="8" + android:visibility="visible" + android:layout_width="match_parent" + android:layout_height="0dp" /> + <TextView + android:layout_width="match_parent" + android:layout_height="0dp" + android:visibility="invisible" + android:clickable="false" + android:layout_weight="1" /> + </LinearLayout> + </FrameLayout> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Sources/app/src/main/res/layout/add_pathview_popup.xml b/Sources/app/src/main/res/layout/add_pathview_popup.xml index d412a39f5b30612e620c5cdd456d81e40e608db3..79c727cb718276ba81158c2fd0842624609f7c6b 100644 --- a/Sources/app/src/main/res/layout/add_pathview_popup.xml +++ b/Sources/app/src/main/res/layout/add_pathview_popup.xml @@ -18,6 +18,7 @@ android:layout_marginBottom="20dp"> <TextView + android:id="@+id/pathview_popup_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/slate_200" @@ -26,8 +27,7 @@ android:textSize="20sp" android:layout_marginBottom="4dp" android:textStyle="bold" - android:padding="10dp" - /> + android:padding="10dp"/> </LinearLayout> <TextView @@ -58,6 +58,35 @@ android:textSize="20sp" android:textStyle="bold"/> </LinearLayout> + <TextView + android:id="@+id/pathview_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_pathway_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_pathway" + 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" diff --git a/Sources/app/src/main/res/layout/add_pathway_popup.xml b/Sources/app/src/main/res/layout/add_pathway_popup.xml index c58b8d4ce26f17aaab82dc15b3875b281ceb394a..fc33d43950e76041dfb685eae26981809a25bb2c 100644 --- a/Sources/app/src/main/res/layout/add_pathway_popup.xml +++ b/Sources/app/src/main/res/layout/add_pathway_popup.xml @@ -142,6 +142,24 @@ </LinearLayout> </LinearLayout> + <TextView + android:id="@+id/new_room_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_room" + 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" diff --git a/Sources/app/src/main/res/layout/popup_goto.xml b/Sources/app/src/main/res/layout/popup_goto.xml new file mode 100644 index 0000000000000000000000000000000000000000..a45c598d736405037f550f4602b9d34ab1a5b8c9 --- /dev/null +++ b/Sources/app/src/main/res/layout/popup_goto.xml @@ -0,0 +1,94 @@ +<?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:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@color/slate_200" + android:text="@string/go_to_room" + android:textColor="@color/blue_500" + android:textSize="20sp" + android:layout_marginBottom="4dp" + android:textStyle="bold" + android:padding="10dp" + /> + </LinearLayout> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="10dp" + android:layout_marginEnd="10dp" + android:orientation="vertical" + android:background="@color/slate_200"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <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/select_room" + 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:gravity="end"> + <SearchView + android:id="@+id/room_search" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end" + android:searchIcon="@drawable/ic_search_black" /> + </LinearLayout> + </LinearLayout> + <ListView + android:id="@+id/room_list" + android:layout_width="match_parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" + android:layout_marginBottom="4dp" + android:background="@color/slate_50" + android:layout_height="200dp"/> + </LinearLayout> + + <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> + </LinearLayout> +</RelativeLayout> \ No newline at end of file diff --git a/Sources/app/src/main/res/values-fr/strings.xml b/Sources/app/src/main/res/values-fr/strings.xml index ee7daf9bc9fe1ec44cfb8a9f2f6c8a3916c7b281..a25ddb4671f6a6fc6e18ed798f190cc4533760bc 100644 --- a/Sources/app/src/main/res/values-fr/strings.xml +++ b/Sources/app/src/main/res/values-fr/strings.xml @@ -62,11 +62,18 @@ <string name="photo_preview">Previsualisation de la photo</string> <string name="keep_phone_straight">Gardez votre téléphone droit</string> <string name="change_photo">Changer la photo</string> - <string name="door_too_small">La zone de porte est trop petite !</string> - <string name="new_pathview">Nouvelle zone de porte</string> - <string name="pathview_path">Porte correspondante</string> + <string name="door_too_small">La zone de passage est trop petite !</string> + <string name="new_pathview">Nouvelle zone de passage</string> + <string name="pathview_path">Passage correspondant</string> <string name="add">Ajouter</string> <string name="actions">Actions</string> <string name="directions">Directions</string> <string name="go_to">Aller à</string> + <string name="edit_pathview">Modifier la zone de passage</string> + <string name="no_pathways_available">Aucun passage créé</string> + <string name="go_to_room">Aller à une pièce</string> + <string name="select_room">Sélectionnez une pièce</string> + <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> </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 8effd5602e59f76dbf50b40810386d90c8f83521..d19e894d5ff309ff376145e9059974d47a308ad1 100644 --- a/Sources/app/src/main/res/values/strings.xml +++ b/Sources/app/src/main/res/values/strings.xml @@ -62,11 +62,19 @@ <string name="select_doors">Select all the doors</string> <string name="keep_phone_straight">Keep your phone straight</string> <string name="change_photo">Change photo</string> - <string name="door_too_small">Door zone is too small !</string> - <string name="new_pathview">New door zone</string> - <string name="pathview_path">Corresponding door</string> + <string name="door_too_small">Pathway zone is too small !</string> + <string name="new_pathview">New pathway zone</string> + <string name="pathview_path">Corresponding pathway</string> <string name="add">Add</string> <string name="actions">Actions</string> <string name="directions">Directions</string> <string name="go_to">Go to</string> + <string name="edit_pathview">Edit pathview</string> + <string name="no_pathways_available">No pathways created</string> + <string name="go_to_room">Go to room</string> + <string name="select_room">Select a room</string> + <string name="no_photos_taken">Sorry, no photos have been taken for this room</string> + <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> </resources> \ No newline at end of file