mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 02:45:53 +03:00
Focus on search bar when opening reaction view
This commit is contained in:
parent
7e5ec29977
commit
7d911fff17
2 changed files with 8 additions and 1 deletions
|
@ -165,6 +165,12 @@ class EmojiReactionPickerActivity : VectorBaseActivity<ActivityEmojiReactionPick
|
|||
}
|
||||
})
|
||||
|
||||
searchView.setOnCloseListener {
|
||||
currentFocus?.clearFocus()
|
||||
searchItem.collapseActionView()
|
||||
true
|
||||
}
|
||||
|
||||
searchView.queryTextChanges()
|
||||
.throttleWithTimeout(600, TimeUnit.MILLISECONDS)
|
||||
.doOnError { err -> Timber.e(err) }
|
||||
|
@ -174,6 +180,7 @@ class EmojiReactionPickerActivity : VectorBaseActivity<ActivityEmojiReactionPick
|
|||
}
|
||||
.disposeOnDestroy()
|
||||
}
|
||||
searchItem.expandActionView()
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
app:iconTint="?vctr_content_primary"
|
||||
android:title="@string/search"
|
||||
app:actionViewClass="android.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|ifRoom" />
|
||||
app:showAsAction="collapseActionView|always" />
|
||||
</menu>
|
||||
|
|
Loading…
Reference in a new issue