diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java index 00e151f..49a9b05 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java @@ -307,6 +307,12 @@ public class GeofavoriteDetailActivity extends NextcloudMapsStyledActivity imple CategoriesAdapter categoriesAdapter = new CategoriesAdapter(binding.root.getContext()); this.binding.categoryAt.setAdapter(categoriesAdapter); this.binding.categoryAt.setText(Geofavorite.DEFAULT_CATEGORY); + this.binding.categoryAtClear.setOnClickListener((v) -> { + if (this.binding.categoryAt.getText().toString().isEmpty()) + this.binding.categoryAt.setText(Geofavorite.DEFAULT_CATEGORY); + else + this.binding.categoryAt.setText(""); + }); // Set map properties this.binding.map.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER); diff --git a/app/src/main/res/drawable/ic_clear.xml b/app/src/main/res/drawable/ic_clear.xml new file mode 100644 index 0000000..844b6b6 --- /dev/null +++ b/app/src/main/res/drawable/ic_clear.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/activity_geofavorite_detail.xml b/app/src/main/res/layout/activity_geofavorite_detail.xml index 8becd41..4d10f5f 100644 --- a/app/src/main/res/layout/activity_geofavorite_detail.xml +++ b/app/src/main/res/layout/activity_geofavorite_detail.xml @@ -198,21 +198,34 @@ android:drawableTint="@color/defaultBrand" android:hint="@string/description"/> - + android:orientation="horizontal" + android:layout_marginTop="20dp"> + + + + + +