-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: Made search, susi icon invisible in stt fragment #2201
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,6 +109,8 @@ class ChatActivity : AppCompatActivity(), IChatView { | |
| chatPresenter.startComputingThread() | ||
| } | ||
| } | ||
| searchChat.visibility = View.VISIBLE | ||
| fabsetting.visibility = View.VISIBLE | ||
| } | ||
|
|
||
| override fun onTouchEvent(event: MotionEvent): Boolean { | ||
|
|
@@ -326,6 +328,8 @@ class ChatActivity : AppCompatActivity(), IChatView { | |
| chatPresenter.stopHotwordDetection() | ||
| } | ||
| hideSoftKeyboard(this, window.decorView) | ||
| searchChat.visibility = View.INVISIBLE | ||
| fabsetting.visibility = View.INVISIBLE | ||
| val fragmentTransaction = supportFragmentManager.beginTransaction() | ||
| fragmentTransaction.replace(R.id.speechToTextFrame, STTFragment()) | ||
| fragmentTransaction.addToBackStack(null) | ||
|
|
@@ -334,6 +338,8 @@ class ChatActivity : AppCompatActivity(), IChatView { | |
|
|
||
| //Replies user with Speech | ||
| override fun voiceReply(reply: String, language: String) { | ||
| searchChat.visibility = View.VISIBLE | ||
| fabsetting.visibility = View.VISIBLE | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And what about it?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When we open up sttfragment, and give some voice commands, the chat activity is not again restarted. It simply calls the function voiceReply. So, it was necessary to make the visibility here |
||
| val audioFocus = getSystemService(Context.AUDIO_SERVICE) as AudioManager | ||
| val handler = Handler() | ||
| handler.post { | ||
|
|
||
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.
Why not
View.GONE, so it will not accessible.