Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
26298f5c
authored
Mar 24, 2017
by
Germán Callejas Alcántara
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Añadido sonido al pulsar/liberar boton de grabar en la edición de pictograma. Más intuitivo.
parent
98b90672
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
android/Pictogram/tabletlibrary/src/main/java/com/yottacode/pictogram/tabletlibrary/gui/communicator/cropper/EditPictoActivity.java
View file @
26298f5c
...
...
@@ -8,6 +8,7 @@ import android.database.Cursor;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Point
;
import
android.media.MediaActionSound
;
import
android.media.MediaPlayer
;
import
android.media.MediaRecorder
;
import
android.net.Uri
;
...
...
@@ -44,7 +45,6 @@ import java.io.IOException;
import
java.util.Random
;
import
pl.droidsonroids.gif.GifTextView
;
import
static
java
.
lang
.
Thread
.
sleep
;
/**
...
...
@@ -57,6 +57,11 @@ public class EditPictoActivity extends Activity {
private
int
id_picto
;
Random
nRandom
=
new
Random
();
int
pathNumber
;
final
MediaActionSound
recordSoundOn
=
new
MediaActionSound
();
final
MediaActionSound
recordSoundOff
=
new
MediaActionSound
();;
private
static
final
int
CAMERA_PIC_REQUEST
=
1
;
private
static
final
int
GALLERY_PIC_REQUEST
=
2
;
...
...
@@ -371,14 +376,24 @@ public class EditPictoActivity extends Activity {
public
boolean
onTouch
(
View
v
,
MotionEvent
event
)
{
switch
(
event
.
getAction
()){
case
MotionEvent
.
ACTION_DOWN
:
recordSoundOn
.
play
(
MediaActionSound
.
START_VIDEO_RECORDING
);
tareaGrabacion
=
(
RecordTask
)
new
RecordTask
().
execute
(
tiempoGrabado
);
startRecording
();
gifRecord
.
setBackgroundResource
(
R
.
drawable
.
record_animation
);
try
{
//Para que no capture el sonido del sistema
sleep
(
500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
startRecording
();
Log
.
i
(
DEBUG_MESSAGE
,
"Grabando.."
);
return
true
;
case
MotionEvent
.
ACTION_UP
:
gifRecord
.
setBackgroundResource
(
R
.
color
.
white
);
tareaGrabacion
.
cancel
(
true
);
recordSoundOff
.
play
(
MediaActionSound
.
FOCUS_COMPLETE
);
return
true
;
}
return
false
;
...
...
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