diff --git a/app/src/main/java/com/example/acloc/adapter/MyReportsAdapter.java b/app/src/main/java/com/example/acloc/adapter/MyReportsAdapter.java index ccf3380..b2c89d4 100644 --- a/app/src/main/java/com/example/acloc/adapter/MyReportsAdapter.java +++ b/app/src/main/java/com/example/acloc/adapter/MyReportsAdapter.java @@ -86,16 +86,12 @@ public class MyReportsAdapter extends RecyclerView.Adapter { - removeReport(report.getUuid()); - } + (dialogInterface, i) -> removeReport(report.getUuid()) ); dialog.show(); }); - holder.ivEdit.setOnClickListener(v -> { - Helper.goTo(context, AddReportActivity.class, Constants.REPORT, report); - }); + holder.ivEdit.setOnClickListener(v -> Helper.goTo(context, AddReportActivity.class, Constants.REPORT, report)); } } catch (Exception e) { Log.e(TAG, "Error in MyReports Adapter", e); diff --git a/app/src/main/java/com/example/acloc/adapter/PlaceReportsAdapter.java b/app/src/main/java/com/example/acloc/adapter/PlaceReportsAdapter.java index 336213f..0deb8bc 100644 --- a/app/src/main/java/com/example/acloc/adapter/PlaceReportsAdapter.java +++ b/app/src/main/java/com/example/acloc/adapter/PlaceReportsAdapter.java @@ -26,6 +26,7 @@ public class PlaceReportsAdapter extends RecyclerView.Adapter reportList = new ArrayList<>(); + private BottomSheetBehavior behavior; + + public PlaceBottomSheetDialog(Place place) { + this.place = place; + } + + @NonNull + @Override + public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { + BottomSheetDialog dialog = (BottomSheetDialog) super.onCreateDialog(savedInstanceState); + + dialog.setOnShowListener(dialogInterface -> { + BottomSheetDialog bottomSheetDialog = (BottomSheetDialog) dialogInterface; + View bottomSheet = bottomSheetDialog.findViewById(com.google.android.material.R.id.design_bottom_sheet); + if (bottomSheet != null) { + behavior = BottomSheetBehavior.from(bottomSheet); + behavior.setPeekHeight(getResources().getDisplayMetrics().heightPixels / 2); + behavior.setState(BottomSheetBehavior.STATE_HALF_EXPANDED); + } + }); + + return dialog; + } + + @Nullable + @Override + public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.bottom_sheet_place_detail, container, false); + context = getContext(); + + initUI(view); + setPlaceData(); + initListeners(); + checkIfPlaceIsFavorite(SharedPref.getUserUid(context), place.getUuid()); + loadReports(); + + return view; + } + + private void initUI(View view) { + tvPlaceName = view.findViewById(R.id.tvPlaceName); + tvAddress = view.findViewById(R.id.tvAddress); + tvDescription = view.findViewById(R.id.tvDescription); + tvNoReports = view.findViewById(R.id.tvNoData); + ivFavorite = view.findViewById(R.id.ivFavorite); + ivEdit = view.findViewById(R.id.ivEdit); + ivExpand = view.findViewById(R.id.ivExpand); + btnAddReport = view.findViewById(R.id.btnAddReport); + rvReports = view.findViewById(R.id.rvReports); + + // Set up RecyclerView + rvReports.setLayoutManager(new LinearLayoutManager(context)); + } + + private void setPlaceData() { + tvPlaceName.setText(place.getName()); + tvAddress.setText(place.getAddress()); + tvDescription.setText(place.getDescription()); + } + + private void initListeners() { + ivFavorite.setOnClickListener(v -> { + if (isFavorite) { + removePlaceFromFavorites(SharedPref.getUserUid(context), place.getUuid()); + } else { + addPlaceToFavorites(SharedPref.getUserUid(context), place.getUuid()); + } + }); + + ivEdit.setOnClickListener(v -> { + Helper.goTo(context, AddNewPlaceActivity.class, Constants.PLACE, place); + dismiss(); + }); + + ivExpand.setOnClickListener(v -> { + if (behavior.getState() == BottomSheetBehavior.STATE_EXPANDED) { + behavior.setState(BottomSheetBehavior.STATE_HALF_EXPANDED); + ivExpand.setImageResource(R.drawable.ic_expand_less); + } else { + behavior.setState(BottomSheetBehavior.STATE_EXPANDED); + ivExpand.setImageResource(R.drawable.ic_expand_more); + } + }); + + btnAddReport.setOnClickListener(v -> { + Helper.goTo(context, AddReportActivity.class, Constants.PLACE, place); + dismiss(); + }); + + // Open full screen details on click + View.OnClickListener fullScreenListener = v -> { + Helper.goTo(context, PlaceDetailActivity.class, Constants.PLACE, place); + dismiss(); + }; + + tvPlaceName.setOnClickListener(fullScreenListener); + tvAddress.setOnClickListener(fullScreenListener); + tvDescription.setOnClickListener(fullScreenListener); + } + + private void loadReports() { + String token = "Bearer " + SharedPref.getAccessToken(context); + ReportService reportService = LocationApiClient.getInstance().getReportService(); + + Call call = reportService.getPlaceReports(token, place.getUuid()); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful() && response.body() != null) { + JsonObject responseBody = response.body(); + JsonObject data = responseBody.getAsJsonObject("_data"); + + if (data != null && data.has("reports")) { + reportList.clear(); + + for (JsonElement element : data.getAsJsonArray("reports")) { + JsonObject reportObject = element.getAsJsonObject(); + Report report = new Report(); + + report.setUuid(reportObject.get("uuid").getAsString()); + report.setReportRating(reportObject.get("rating").getAsInt()); + report.setDescription(reportObject.get("description").getAsString()); + report.setPlaceName(reportObject.get("place_name").getAsString()); + report.setPlaceUuid(reportObject.get("place_uuid").getAsString()); + + reportList.add(report); + } + + // Show latest reports first + Collections.reverse(reportList); + List latestReports = reportList.size() > 3 ? + reportList.subList(0, 3) : reportList; + + updateReportsUI(latestReports); + } else { + showNoReports(); + } + } else { + showNoReports(); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + showNoReports(); + } + }); + } + + private void updateReportsUI(List reports) { + if (reports != null && !reports.isEmpty()) { + adapter = new PlaceReportsAdapter(context, reports); + rvReports.setAdapter(adapter); + rvReports.setVisibility(View.VISIBLE); + tvNoReports.setVisibility(View.GONE); + } else { + showNoReports(); + } + } + + private void showNoReports() { + rvReports.setVisibility(View.GONE); + tvNoReports.setVisibility(View.VISIBLE); + } + + private void checkIfPlaceIsFavorite(String userUuid, String placeUuid) { + String token = "Bearer " + SharedPref.getAccessToken(context); + FavoriteService favoriteService = LocationApiClient.getInstance().getFavoriteService(); + + Call call = favoriteService.getFavoritePlaces(token, userUuid); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + if (response.isSuccessful() && response.body() != null) { + JsonObject body = response.body(); + JsonArray favoritesArray = body.getAsJsonObject("_data").getAsJsonArray("favorites"); + + isFavorite = false; + for (JsonElement item : favoritesArray) { + JsonObject favoriteObj = item.getAsJsonObject(); + String favPlaceUuid = favoriteObj.get("place_uuid").getAsString(); + if (favPlaceUuid.equals(placeUuid)) { + isFavorite = true; + break; + } + } + updateFavoriteIcon(); + } else { + isFavorite = false; + updateFavoriteIcon(); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + isFavorite = false; + updateFavoriteIcon(); + } + }); + } + + private void updateFavoriteIcon() { + if (isFavorite) { + ivFavorite.setImageResource(R.drawable.ic_favorite); + } else { + ivFavorite.setImageResource(R.drawable.ic_favorite_border); + } + } + + private void addPlaceToFavorites(String userUuid, String placeUuid) { + DialogUtils.showLoadingDialog(context, getString(R.string.Adding_to_favorites)); + + JsonObject body = new JsonObject(); + body.addProperty("place_uuid", placeUuid); + + String token = "Bearer " + SharedPref.getAccessToken(context); + FavoriteService favoriteService = LocationApiClient.getInstance().getFavoriteService(); + + Call call = favoriteService.restorePlaceToFavorites(token, userUuid, body); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + DialogUtils.dismissDialog(); + if (response.isSuccessful()) { + isFavorite = true; + updateFavoriteIcon(); + Helper.showToast(context, getString(R.string.Place_added_to_favorites)); + } else { + try { + if (response.errorBody() != null) { + String errorBody = response.errorBody().string(); + + // Try restoring if it's a duplicate (409 Conflict) + if (response.code() == 409 && errorBody.contains("ER_DUP_ENTRY")) { + restorePlaceToFavorites(userUuid, placeUuid); + return; + } + } + } catch (IOException e) { + Log.e(TAG, "ERROR: ", e); + } + + Helper.showToast(context, getString(R.string.Failed_to_add_favorite_Server_error)); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + DialogUtils.dismissDialog(); + Helper.showToast(context, getString(R.string.Network_error_Try_again)); + } + }); + } + + private void restorePlaceToFavorites(String userUuid, String placeUuid) { + DialogUtils.showLoadingDialog(context, getString(R.string.Restoring_favorite)); + + JsonObject body = new JsonObject(); + body.addProperty("place_uuid", placeUuid); + + String token = "Bearer " + SharedPref.getAccessToken(context); + FavoriteService favoriteService = LocationApiClient.getInstance().getFavoriteService(); + + Call call = favoriteService.restorePlaceToFavorites(token, userUuid, body); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + DialogUtils.dismissDialog(); + if (response.isSuccessful()) { + isFavorite = true; + updateFavoriteIcon(); + Helper.showToast(context, getString(R.string.Place_restored_to_favorites)); + } else { + Helper.showToast(context, getString(R.string.Failed_to_restore_favorite)); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + DialogUtils.dismissDialog(); + Helper.showToast(context, getString(R.string.Network_error_Try_again)); + } + }); + } + + private void removePlaceFromFavorites(String userUuid, String placeUuid) { + DialogUtils.showLoadingDialog(context, getString(R.string.Removing_from_favorites)); + + String token = "Bearer " + SharedPref.getAccessToken(context); + FavoriteService favoriteService = LocationApiClient.getInstance().getFavoriteService(); + + Call call = favoriteService.removePlaceFromFavorites(token, userUuid, placeUuid); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call, Response response) { + DialogUtils.dismissDialog(); + if (response.isSuccessful()) { + isFavorite = false; + updateFavoriteIcon(); + Helper.showToast(context, getString(R.string.Removed_from_favorites)); + } else { + Helper.showToast(context, getString(R.string.Failed_to_remove_from_favorites)); + } + } + + @Override + public void onFailure(Call call, Throwable t) { + DialogUtils.dismissDialog(); + Helper.showToast(context, getString(R.string.Network_error_Try_again)); + } + }); + } +} diff --git a/app/src/main/java/com/example/acloc/fragments/MapFragment.java b/app/src/main/java/com/example/acloc/fragments/MapFragment.java index dffa872..04715e5 100644 --- a/app/src/main/java/com/example/acloc/fragments/MapFragment.java +++ b/app/src/main/java/com/example/acloc/fragments/MapFragment.java @@ -12,23 +12,29 @@ import android.location.Geocoder; import android.location.Location; import android.net.Uri; import android.os.Bundle; - -import androidx.annotation.NonNull; -import androidx.core.content.ContextCompat; -import androidx.fragment.app.Fragment; - +import android.os.Handler; +import android.os.Looper; import android.provider.Settings; +import android.text.Editable; +import android.text.TextWatcher; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.ListView; import android.widget.RelativeLayout; -import com.ieslamar.acloc.R; +import androidx.annotation.NonNull; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.Fragment; + import com.example.acloc.activity.AddNewPlaceActivity; import com.example.acloc.activity.PlaceDetailActivity; import com.example.acloc.api.LocationApiClient; +import com.example.acloc.dialog.PlaceBottomSheetDialog; import com.example.acloc.model.Place; import com.example.acloc.service.PlaceService; import com.example.acloc.utility.Constants; @@ -40,8 +46,10 @@ import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; import com.google.android.material.textfield.TextInputEditText; +import com.ieslamar.acloc.R; import org.json.JSONArray; import org.json.JSONObject; @@ -59,19 +67,26 @@ import retrofit2.Response; public class MapFragment extends Fragment { public static final String TAG = MapFragment.class.getSimpleName(); private static final int LOCATION_PERMISSION_REQUEST_CODE = 1001; + private static final float DEFAULT_ZOOM = 14f; + private static final float SEARCH_ZOOM = 16f; private RelativeLayout rlMap; private View view; private TextInputEditText etSearchLocation; + private ListView lvSuggestions; private GoogleMap googleMap; private FusedLocationProviderClient fusedLocationClient; private Geocoder geocoder; private Dialog dialog; private Context context; + private Handler searchHandler = new Handler(Looper.getMainLooper()); + private Runnable searchRunnable; + private List suggestionsList = new ArrayList<>(); + private ArrayAdapter suggestionsAdapter; + private List
addressResults = new ArrayList<>(); private List placeList = new ArrayList<>(); - public MapFragment() { } @@ -94,10 +109,32 @@ public class MapFragment extends Fragment { private void initUI() { rlMap = view.findViewById(R.id.rlMap); etSearchLocation = view.findViewById(R.id.etSearchLocation); + + // Initialize suggestions ListView + lvSuggestions = view.findViewById(R.id.lvSuggestions); + if (lvSuggestions == null) { + // If the ListView doesn't exist in the layout, create it programmatically + lvSuggestions = new ListView(getContext()); + lvSuggestions.setId(View.generateViewId()); + RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.WRAP_CONTENT + ); + params.addRule(RelativeLayout.BELOW, etSearchLocation.getId()); + lvSuggestions.setLayoutParams(params); + lvSuggestions.setVisibility(View.GONE); + lvSuggestions.setBackgroundColor(getResources().getColor(android.R.color.white)); + rlMap.addView(lvSuggestions); + } } private void initObj() { context = getContext(); + + // Initialize suggestions adapter + suggestionsAdapter = new ArrayAdapter<>(context, + android.R.layout.simple_list_item_1, suggestionsList); + lvSuggestions.setAdapter(suggestionsAdapter); } @SuppressLint("ClickableViewAccessibility") @@ -126,6 +163,7 @@ public class MapFragment extends Fragment { String address = Helper.getStringFromInput(etSearchLocation); if (!address.isEmpty()) { searchLocationByAddress(address); + lvSuggestions.setVisibility(View.GONE); } return true; } @@ -134,16 +172,106 @@ public class MapFragment extends Fragment { return false; }); + // Add TextWatcher for search suggestions + etSearchLocation.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + // Cancel any pending searches + if (searchRunnable != null) { + searchHandler.removeCallbacks(searchRunnable); + } + + // If text is empty, hide suggestions + if (s.length() == 0) { + lvSuggestions.setVisibility(View.GONE); + return; + } + + // Delay search to avoid too many API calls while typing + searchRunnable = () -> getSuggestions(s.toString()); + searchHandler.postDelayed(searchRunnable, 300); + } + + @Override + public void afterTextChanged(Editable s) { + } + }); + + // Handle suggestion click + lvSuggestions.setOnItemClickListener((parent, view, position, id) -> { + String selectedAddress = suggestionsList.get(position); + etSearchLocation.setText(selectedAddress); + + // Get the corresponding Address object + if (position < addressResults.size()) { + Address address = addressResults.get(position); + LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude()); + + // Zoom to the selected location + googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, SEARCH_ZOOM)); + + // Find the closest place + Place closestPlace = findClosestPlace(latLng); + if (closestPlace != null) { + // Show the place details in a bottom sheet + showPlaceBottomSheet(closestPlace); + } + } + + lvSuggestions.setVisibility(View.GONE); + }); + // trigger on Enter/Done key etSearchLocation.setOnEditorActionListener((v, actionId, event) -> { String address = Helper.getStringFromInput(etSearchLocation); if (!address.isEmpty()) { searchLocationByAddress(address); + lvSuggestions.setVisibility(View.GONE); } return true; }); } + private void getSuggestions(String query) { + if (query.length() < 3) { + lvSuggestions.setVisibility(View.GONE); + return; + } + + try { + // Clear previous results + suggestionsList.clear(); + addressResults.clear(); + + // Get suggestions from Geocoder + List
addresses = geocoder.getFromLocationName(query, 5); + if (addresses != null && !addresses.isEmpty()) { + for (Address address : addresses) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i <= address.getMaxAddressLineIndex(); i++) { + if (i > 0) sb.append(", "); + sb.append(address.getAddressLine(i)); + } + String addressText = sb.toString(); + suggestionsList.add(addressText); + addressResults.add(address); + } + + suggestionsAdapter.notifyDataSetChanged(); + lvSuggestions.setVisibility(View.VISIBLE); + } else { + lvSuggestions.setVisibility(View.GONE); + } + } catch (IOException e) { + Log.e(TAG, "Error getting suggestions", e); + lvSuggestions.setVisibility(View.GONE); + } + } + private void initMap() { fetchAndShowAllPlaces(); @@ -158,7 +286,7 @@ public class MapFragment extends Fragment { fusedLocationClient.getLastLocation().addOnSuccessListener(location -> { if (location != null) { LatLng currentLatLng = new LatLng(location.getLatitude(), location.getLongitude()); - googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 14f)); + googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, DEFAULT_ZOOM)); showNearbyPlaces(currentLatLng); } }); @@ -166,7 +294,7 @@ public class MapFragment extends Fragment { googleMap.setOnMapClickListener(latLng -> { Place existingPlace = getPlaceIfExists(latLng); if (existingPlace != null) { - Helper.goTo(getContext(), PlaceDetailActivity.class, Constants.PLACE, existingPlace); //Navigate to PlaceDetailActivity if the place already exists + showPlaceBottomSheet(existingPlace); return; } else { try { @@ -193,7 +321,6 @@ public class MapFragment extends Fragment { placeEntity.setDescription(""); // Empty description placeEntity.setUuid(null); // No UUID for a new place Helper.goTo(getContext(), AddNewPlaceActivity.class, Constants.PLACE, placeEntity); - } } catch (IOException e) { e.printStackTrace(); @@ -208,14 +335,12 @@ public class MapFragment extends Fragment { Place existingPlace = getPlaceIfExists(latLng); if (existingPlace != null) { - Helper.goTo(getContext(), PlaceDetailActivity.class, Constants.PLACE, existingPlace); + showPlaceBottomSheet(existingPlace); return true; } return true; }); - - } else { requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_PERMISSION_REQUEST_CODE); } @@ -239,6 +364,39 @@ public class MapFragment extends Fragment { return null; } + private Place findClosestPlace(LatLng searchLatLng) { + if (placeList.isEmpty()) { + return null; + } + + Place closestPlace = null; + float minDistance = Float.MAX_VALUE; + float[] result = new float[1]; + + for (Place place : placeList) { + double lat = Double.parseDouble(place.getLatitude()); + double lng = Double.parseDouble(place.getLongitude()); + + Location.distanceBetween( + searchLatLng.latitude, searchLatLng.longitude, + lat, lng, + result); + + if (result[0] < minDistance) { + minDistance = result[0]; + closestPlace = place; + } + } + + // Only return if within reasonable distance (1000 meters) + return minDistance < 1000 ? closestPlace : null; + } + + private void showPlaceBottomSheet(Place place) { + PlaceBottomSheetDialog bottomSheet = new PlaceBottomSheetDialog(place); + bottomSheet.show(getChildFragmentManager(), "PlaceBottomSheet"); + } + private void showNearbyPlaces(LatLng latLng) { googleMap.clear(); } @@ -249,8 +407,17 @@ public class MapFragment extends Fragment { if (addresses != null && !addresses.isEmpty()) { Address location = addresses.get(0); LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude()); - googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 14f)); - showNearbyPlaces(latLng); + googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, SEARCH_ZOOM)); + + // Find the closest place to the search result + Place closestPlace = findClosestPlace(latLng); + if (closestPlace != null) { + // Show the place details in a bottom sheet + showPlaceBottomSheet(closestPlace); + } else { + // No close places found + Helper.makeSnackBar(rlMap, "No places found near this location"); + } } else { Helper.makeSnackBar(rlMap, "Location not found"); } @@ -294,6 +461,7 @@ public class MapFragment extends Fragment { private void fetchAndShowAllPlaces() { String token = "Bearer " + SharedPref.getAccessToken(context); // get saved token + // Using the new PlaceService through LocationApiClient PlaceService placeService = LocationApiClient.getInstance().getPlaceService(); Call call = placeService.getAllPlaces(token); @@ -305,6 +473,9 @@ public class MapFragment extends Fragment { JSONObject jsonObject = new JSONObject(response.body().string()); JSONArray placesArray = jsonObject.getJSONObject("_data").getJSONArray("places"); + // Clear existing places + placeList.clear(); + for (int i = 0; i < placesArray.length(); i++) { JSONObject placeObj = placesArray.getJSONObject(i); String name = placeObj.getString("name"); diff --git a/app/src/main/java/com/example/acloc/model/Report.java b/app/src/main/java/com/example/acloc/model/Report.java index 8cb6ac8..85eff06 100644 --- a/app/src/main/java/com/example/acloc/model/Report.java +++ b/app/src/main/java/com/example/acloc/model/Report.java @@ -3,9 +3,9 @@ package com.example.acloc.model; import java.io.Serializable; public class Report implements Serializable { - String uuid, fkUser, fkPlace, fkReportType, description, createdBy; - String placeName, placeUuid; - int reportRating; + private String uuid, fkUser, fkPlace, fkReportType, description, created, createdBy; + private String placeName, placeUuid; + private int reportRating; public String getUuid() { return uuid; @@ -46,7 +46,9 @@ public class Report implements Serializable { public void setDescription(String description) { this.description = description; } - + public String getCreationDate(){ + return created; + } public String getCreatedBy() { return createdBy; } @@ -78,4 +80,7 @@ public class Report implements Serializable { public void setPlaceUuid(String placeUuid) { this.placeUuid = placeUuid; } + public String getCreatedDate(){ + return created; + } } diff --git a/app/src/main/res/drawable/ic_expand_less.xml b/app/src/main/res/drawable/ic_expand_less.xml new file mode 100644 index 0000000..75f80b6 --- /dev/null +++ b/app/src/main/res/drawable/ic_expand_less.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/drawable/ic_expand_more.xml b/app/src/main/res/drawable/ic_expand_more.xml new file mode 100644 index 0000000..bf29bcc --- /dev/null +++ b/app/src/main/res/drawable/ic_expand_more.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/bottom_sheet_place_detail.xml b/app/src/main/res/layout/bottom_sheet_place_detail.xml new file mode 100644 index 0000000..ea34e1a --- /dev/null +++ b/app/src/main/res/layout/bottom_sheet_place_detail.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/layout/fragment_favorite.xml b/app/src/main/res/layout/fragment_favorite.xml index ec2bec1..1ab129b 100644 --- a/app/src/main/res/layout/fragment_favorite.xml +++ b/app/src/main/res/layout/fragment_favorite.xml @@ -4,8 +4,7 @@ android:id="@+id/rlFavorite" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_marginTop="?attr/actionBarSize" - tools:context=".fragment.FavoriteFragment"> + android:layout_marginTop="?attr/actionBarSize"> - - - - - + tools:context="com.example.acloc.fragments.MapFragment"> + android:layout_height="match_parent" /> + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/list_view_place_reports.xml b/app/src/main/res/layout/list_view_place_reports.xml index 589a0e5..8ce7f14 100644 --- a/app/src/main/res/layout/list_view_place_reports.xml +++ b/app/src/main/res/layout/list_view_place_reports.xml @@ -1,91 +1,50 @@ - + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + app:cardCornerRadius="8dp" + app:cardElevation="2dp"> - + android:orientation="vertical" + android:padding="12dp"> - - + + + android:orientation="horizontal"> - + - - - - - - - - - - - - - - + android:textSize="12sp" + android:textStyle="bold" + tools:text="GOOD" /> - - - + +