Category reset button
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
							
								
								
									
										5
									
								
								app/src/main/res/drawable/ic_clear.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								app/src/main/res/drawable/ic_clear.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| <vector android:height="24dp" android:tint="#000000" | ||||
|     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="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/> | ||||
| </vector> | ||||
| @@ -198,21 +198,34 @@ | ||||
|                     android:drawableTint="@color/defaultBrand" | ||||
|                     android:hint="@string/description"/> | ||||
|  | ||||
|                 <AutoCompleteTextView | ||||
|                     android:id="@+id/category_at" | ||||
|                 <LinearLayout | ||||
|                     android:layout_width="match_parent" | ||||
|                     android:layout_height="wrap_content" | ||||
|                     android:layout_marginTop="20dp" | ||||
|                     android:ems="10" | ||||
|                     android:gravity="start|top" | ||||
|                     android:inputType="textMultiLine" | ||||
|                     android:maxLines="10" | ||||
|                     android:background="@android:color/transparent" | ||||
|                     android:drawableLeft="@drawable/ic_category_asc" | ||||
|                     android:drawablePadding="5dp" | ||||
|                     android:drawableTint="@color/defaultBrand" | ||||
|                     android:hint="@string/category" | ||||
|                     android:completionThreshold="0"/> | ||||
|                     android:orientation="horizontal" | ||||
|                     android:layout_marginTop="20dp"> | ||||
|  | ||||
|                     <AutoCompleteTextView | ||||
|                         android:id="@+id/category_at" | ||||
|                         android:layout_width="0dp" | ||||
|                         android:layout_height="wrap_content" | ||||
|                         android:layout_weight="1" | ||||
|                         android:maxLines="1" | ||||
|                         android:background="@android:color/transparent" | ||||
|                         android:drawableLeft="@drawable/ic_category_asc" | ||||
|                         android:drawablePadding="5dp" | ||||
|                         android:drawableTint="@color/defaultBrand" | ||||
|                         android:hint="@string/category" | ||||
|                         android:completionThreshold="0"/> | ||||
|  | ||||
|                     <ImageButton | ||||
|                         android:id="@+id/category_at_clear" | ||||
|                         android:layout_width="wrap_content" | ||||
|                         android:layout_height="wrap_content" | ||||
|                         android:padding="3dp" | ||||
|                         android:background="@color/transparent" | ||||
|                         android:src="@drawable/ic_clear"/> | ||||
|  | ||||
|                 </LinearLayout> | ||||
|  | ||||
|                 <TextView | ||||
|                     android:layout_width="match_parent" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user