Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Krishna Vemulavada
/
vera_2.1_app
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2b1589f6
authored
May 02, 2018
by
Kunj Gupta
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixed - Issue #30 - v0.0.33_Listening not stopping on tap
.
parent
ff5bd4bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletions
app/src/main/java/com/vsoft/servicenow/speechRecognizer/DroidSpeech.java
app/src/main/res/layout/speech_progress_layout.xml
app/src/main/java/com/vsoft/servicenow/speechRecognizer/DroidSpeech.java
View file @
2b1589f6
...
...
@@ -20,6 +20,7 @@ import android.support.v4.app.FragmentManager;
import
android.util.Log
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.widget.LinearLayout.LayoutParams
;
import
android.widget.TextView
;
...
...
@@ -185,6 +186,46 @@ public class DroidSpeech {
}
});
recognitionProgressView
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
@Override
public
boolean
onTouch
(
View
view
,
MotionEvent
motionEvent
)
{
if
(
motionEvent
.
getAction
()
==
MotionEvent
.
ACTION_DOWN
)
{
dsProperties
.
closedByUser
=
true
;
// Closing droid speech operations
closeDroidSpeechOperations
();
if
(
droidSpeechListener
!=
null
)
{
// Sending an update that the droid speech was closed by user
droidSpeechListener
.
onDroidSpeechClosedByUser
();
}
else
{
Log
.
i
(
TAG
,
"Droid speech closed"
);
}
}
return
false
;
}
});
recognitionProgressMsg
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
@Override
public
boolean
onTouch
(
View
view
,
MotionEvent
motionEvent
)
{
if
(
motionEvent
.
getAction
()
==
MotionEvent
.
ACTION_DOWN
)
{
dsProperties
.
closedByUser
=
true
;
// Closing droid speech operations
closeDroidSpeechOperations
();
if
(
droidSpeechListener
!=
null
)
{
// Sending an update that the droid speech was closed by user
droidSpeechListener
.
onDroidSpeechClosedByUser
();
}
else
{
Log
.
i
(
TAG
,
"Droid speech closed"
);
}
}
return
false
;
}
});
speechProgressAlertDialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
@Override
public
void
onDismiss
(
DialogInterface
dialogInterface
)
{
...
...
app/src/main/res/layout/speech_progress_layout.xml
View file @
2b1589f6
...
...
@@ -15,7 +15,7 @@
android:id=
"@+id/recognitionProgressMsg"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
layout_margin
=
"@dimen/progressMsgMargin"
android:
padding
=
"@dimen/progressMsgMargin"
android:gravity=
"center"
android:textAppearance=
"?android:attr/textAppearanceMedium"
android:text=
"@string/app_name"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment