forked from recloudstream/cloudstream
		
	fixed search history UI & UX
This commit is contained in:
		
							parent
							
								
									8f4d60bd09
								
							
						
					
					
						commit
						d5c39a21b3
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		|  | @ -353,8 +353,10 @@ class SearchFragment : Fragment() { | ||||||
|             override fun onQueryTextChange(newText: String): Boolean { |             override fun onQueryTextChange(newText: String): Boolean { | ||||||
|                 //searchViewModel.quickSearch(newText) |                 //searchViewModel.quickSearch(newText) | ||||||
|                 val showHistory = newText.isBlank() |                 val showHistory = newText.isBlank() | ||||||
|  |                 if (showHistory) { | ||||||
|                     searchViewModel.clearSearch() |                     searchViewModel.clearSearch() | ||||||
|                     searchViewModel.updateHistory() |                     searchViewModel.updateHistory() | ||||||
|  |                 } | ||||||
| 
 | 
 | ||||||
|                 search_history_recycler?.isVisible = showHistory |                 search_history_recycler?.isVisible = showHistory | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,6 +6,7 @@ | ||||||
|         android:layout_height="wrap_content" |         android:layout_height="wrap_content" | ||||||
|         android:orientation="horizontal" |         android:orientation="horizontal" | ||||||
|         android:id="@+id/home_history_tab" |         android:id="@+id/home_history_tab" | ||||||
|  |         android:foreground="?android:attr/selectableItemBackgroundBorderless" | ||||||
|         android:nextFocusRight="@id/home_history_remove"> |         android:nextFocusRight="@id/home_history_remove"> | ||||||
| 
 | 
 | ||||||
|     <TextView |     <TextView | ||||||
|  | @ -24,6 +25,7 @@ | ||||||
|             android:padding="10dp" |             android:padding="10dp" | ||||||
|             android:id="@+id/home_history_remove" |             android:id="@+id/home_history_remove" | ||||||
|             android:nextFocusLeft="@id/home_history_tab" |             android:nextFocusLeft="@id/home_history_tab" | ||||||
|  |             android:background="?android:attr/selectableItemBackgroundBorderless" | ||||||
| 
 | 
 | ||||||
|             android:src="@drawable/ic_baseline_close_24" |             android:src="@drawable/ic_baseline_close_24" | ||||||
|             android:layout_width="wrap_content" |             android:layout_width="wrap_content" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue