Category reset button

This commit is contained in:
Daniele Verducci (Slimpenguin)
2024-03-01 07:20:29 +01:00
parent 0de02c6d44
commit ce1b921447
3 changed files with 37 additions and 13 deletions

View File

@ -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);