-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search sessions or speakers by voice-search #776
Conversation
Thanks! |
@takahirom |
I think both rebase and merge have good points, so I'm not particular about the policy. Please do it any way you like. 😄 |
Sorry please wait this #787 |
I merged it 🙇 |
That's right. Thanks for answer.😳 |
@@ -10,11 +10,15 @@ | |||
android:supportsRtl="false" | |||
android:usesCleartextTraffic="true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attribute usesCleartextTraffic is only used in API level 23 and higher (current min is 21) |
I think no problem between #781 and mine. |
@@ -148,10 +153,27 @@ class SearchSessionsFragment : Fragment(R.layout.fragment_search_sessions), Inje | |||
} | |||
} | |||
|
|||
override fun onResume() { | |||
super.onResume() | |||
val intent = activity!!.intent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use requireActivity()
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it!😊
...ession/src/main/java/io/github/droidkaigi/confsched2020/session/ui/SearchSessionsFragment.kt
Outdated
Show resolved
Hide resolved
val intent = activity!!.intent | ||
if (intent.action == Intent.ACTION_SEARCH) { | ||
val query: String = intent.getStringExtra(SearchManager.QUERY)!! | ||
val searchResult = searchSessionsViewModel.uiModel.requireValue().searchResult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need to check to change query 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought so.
However, onResume
is called after setQuery
then it's query is same.
I want to only use once setQuery
but I have no idea w/o query != searchResult.query
. 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not so many times, so I think it's okay to call twice, but is there any problem? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not twice. It loops onResume
-> setQuery
-> onResume
.
For example, below code.
override fun onResume() {
super.onResume()
val intent = requireActivity().intent
if (intent.action == Intent.ACTION_SEARCH) {
val query: String = requireNotNull(intent.getStringExtra(SearchManager.QUERY))
val searchView: SearchView? =
menu?.findItem(R.id.search_view)?.actionView as SearchView?
if (searchView != null) {
searchView.setQuery(query, true)
}
}
}
…20/session/ui/SearchSessionsFragment.kt Co-Authored-By: Takahiro Menju <[email protected]>
When we use light theme. we can not see voice icon 😭 |
Yes. i knew it 😂 |
I can try again about voice icon if you can wait🙇♂️ |
Yes! You can this in 1.2 or later 👍 |
I pushed a little refactoring! |
...ession/src/main/java/io/github/droidkaigi/confsched2020/session/ui/SearchSessionsFragment.kt
Outdated
Show resolved
Hide resolved
…20/session/ui/SearchSessionsFragment.kt Co-Authored-By: Takahiro Menju <[email protected]>
I have many things to learn from this refactoring 👀 |
I pushed about voice icon changes!
|
Can you check this? |
Your apk has been deployed to https://deploygate.com/distributions/76f0306b29d4cd5fb9c4c4c6afee4f48bc27b78e. Anyone can try your changes via the link. Generated by 🚫 Danger |
No error was reported but at least one warning was found. Generated by 🚫 Danger |
I fixed 🙏 |
Thanks! LGTM 👍 |
Thanks for so kind reviews 😭 |
Issue
Overview (Required)
-Apply voice input to SearchView
-Don't apply design about mic-icon #437
Links
-https://developer.android.com/reference/android/widget/SearchView
-https://developer.android.com/guide/topics/search/search-dialog.html
-https://developer.android.com/guide/topics/search/searchable-config.html
Screenshot