mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
commit
f97735532c
@ -65,6 +65,7 @@ class SearchFragment : Fragment() {
|
||||
searchRecView = view.findViewById<RecyclerView>(R.id.search_recycler)
|
||||
|
||||
val autoTextView = view.findViewById<AutoCompleteTextView>(R.id.autoCompleteTextView)
|
||||
val clearSearchButton = view.findViewById<ImageView>(R.id.clearSearch_imageView)
|
||||
val historyRecycler = view.findViewById<RecyclerView>(R.id.history_recycler)
|
||||
val filterImageView = view.findViewById<ImageView>(R.id.filterMenu_imageView)
|
||||
|
||||
@ -73,6 +74,10 @@ class SearchFragment : Fragment() {
|
||||
val sharedPreferences =
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||
|
||||
clearSearchButton.setOnClickListener {
|
||||
autoTextView.text.clear()
|
||||
}
|
||||
|
||||
filterImageView.setOnClickListener {
|
||||
val filterOptions = arrayOf(
|
||||
getString(R.string.all),
|
||||
|
@ -28,29 +28,44 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@android:color/transparent"
|
||||
app:hintEnabled="false">
|
||||
app:hintEnabled="false" >
|
||||
|
||||
<AutoCompleteTextView
|
||||
android:id="@+id/autoCompleteTextView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:dropDownWidth="match_parent"
|
||||
android:hint="@string/search_hint"
|
||||
android:imeOptions="actionSearch"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:padding="12dp"
|
||||
android:dropDownWidth="match_parent" />
|
||||
android:padding="12dp" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clearSearch_imageView"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:src="@drawable/ic_close"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginRight="16dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<ImageView
|
||||
|
Loading…
x
Reference in New Issue
Block a user