mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-16 19:50:40 +01:00
animate search holder visibility
This commit is contained in:
parent
2d6c48cd90
commit
be8003718f
@ -142,12 +142,12 @@ class MainActivity : SimpleActivity() {
|
||||
main_menu.top_toolbar.inflateMenu(R.menu.menu_main)
|
||||
main_menu.setupMenu()
|
||||
main_menu.onSearchOpenListener = {
|
||||
search_holder.beVisible()
|
||||
search_holder.fadeIn()
|
||||
conversations_fab.beGone()
|
||||
}
|
||||
|
||||
main_menu.onSearchClosedListener = {
|
||||
search_holder.beGone()
|
||||
search_holder.fadeOut()
|
||||
conversations_fab.beVisible()
|
||||
}
|
||||
|
||||
@ -430,6 +430,10 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun searchTextChanged(text: String) {
|
||||
if (!main_menu.isSearchOpen) {
|
||||
return
|
||||
}
|
||||
|
||||
lastSearchedText = text
|
||||
search_placeholder_2.beGoneIf(text.length >= 2)
|
||||
if (text.length >= 2) {
|
||||
|
@ -79,6 +79,7 @@
|
||||
android:id="@+id/search_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:alpha="0"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
|
Loading…
x
Reference in New Issue
Block a user