fix(comments): hide "search by image" when chips are active
This commit is contained in:
parent
ad82faba3f
commit
120e63ea8a
2 changed files with 10 additions and 3 deletions
|
@ -95,6 +95,7 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
binding.searchChipRecycler.adapter = SearchChipAdapter(activity).also {
|
binding.searchChipRecycler.adapter = SearchChipAdapter(activity).also {
|
||||||
activity.updateChips = { it.update() }
|
activity.updateChips = { it.update() }
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.searchChipRecycler.layoutManager =
|
binding.searchChipRecycler.layoutManager =
|
||||||
LinearLayoutManager(binding.root.context, HORIZONTAL, false)
|
LinearLayoutManager(binding.root.context, HORIZONTAL, false)
|
||||||
|
|
||||||
|
@ -213,13 +214,16 @@ class SearchAdapter(private val activity: SearchActivity, private val type: Stri
|
||||||
binding.searchHistoryList.startAnimation(fadeInAnimation())
|
binding.searchHistoryList.startAnimation(fadeInAnimation())
|
||||||
binding.searchResultLayout.visibility = View.GONE
|
binding.searchResultLayout.visibility = View.GONE
|
||||||
binding.searchHistoryList.visibility = View.VISIBLE
|
binding.searchHistoryList.visibility = View.VISIBLE
|
||||||
|
binding.searchByImage.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
if (binding.searchResultLayout.visibility != View.VISIBLE) {
|
if (binding.searchResultLayout.visibility != View.VISIBLE) {
|
||||||
binding.searchResultLayout.startAnimation(fadeInAnimation())
|
binding.searchResultLayout.startAnimation(fadeInAnimation())
|
||||||
binding.searchHistoryList.startAnimation(fadeOutAnimation())
|
binding.searchHistoryList.startAnimation(fadeOutAnimation())
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.searchResultLayout.visibility = View.VISIBLE
|
binding.searchResultLayout.visibility = View.VISIBLE
|
||||||
binding.searchHistoryList.visibility = View.GONE
|
binding.searchHistoryList.visibility = View.GONE
|
||||||
|
binding.searchByImage.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/extensionCardView"
|
android:id="@+id/extensionCardView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -18,9 +19,10 @@
|
||||||
android:id="@+id/searchHistoryTextView"
|
android:id="@+id/searchHistoryTextView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_semi_bold"
|
android:fontFamily="@font/poppins_bold"
|
||||||
android:text="HENTAI?????"
|
android:text="HENTAI?????"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp"
|
||||||
|
tools:ignore="HardcodedText" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -30,5 +32,6 @@
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:src="@drawable/ic_circle_cancel"
|
android:src="@drawable/ic_circle_cancel"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
app:tint="?attr/colorOnBackground" />
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue