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
78c5a9dd
authored
Apr 27, 2017
by
Germán Callejas Alcántara
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tema grabación de sonidos finalizado (falta hacer más pruebas)
parent
fffdcd97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 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 @
78c5a9dd
...
...
@@ -177,15 +177,14 @@ public class EditPictoActivity extends Activity {
protected
void
onCancelled
(){
stopRecording
();
botonReproducir
.
setEnabled
(
tiempoGrabado
>
1
?
true
:
false
);
botonReproducir
.
setEnabled
(
tiempoGrabado
>
1
);
layoutPreview
.
setVisibility
(
tiempoGrabado
>
1
?
View
.
VISIBLE
:
View
.
GONE
);
layoutGrabacion
.
setVisibility
(
tiempoGrabado
>
1
?
View
.
GONE
:
View
.
VISIBLE
);
tiempoTotal
=
tiempoGrabado
-
1
;
textoTTotal
.
setText
(
tiempoTotal
==
10
?
"00:00 | 00:"
+
tiempoTotal
:
"00:00 | 00:0"
+
tiempoTotal
);
barraReproducir
.
setMax
(
tiempoTotal
);
botonGrabar
.
PhidePressedRing
();
if
(
tiempoGrabado
>=
1
)
hayGrabacion
=
true
;
else
hayGrabacion
=
false
;
hayGrabacion
=
(
tiempoGrabado
>=
1
?
true
:
false
);
//Si lo grabado es al menos 1s => hay grabacion
if
(
hayGrabacion
)
assignFileToPlayer
(
new
File
(
previewAudioPath
));
reiniciarGrabacion
();
}
...
...
@@ -500,7 +499,7 @@ public class EditPictoActivity extends Activity {
case
MotionEvent
.
ACTION_UP
:
tareaGrabacion
.
cancel
(
true
);
gifRecord
.
setBackgroundResource
(
R
.
color
.
white
);
assignFileToPlayer
(
new
File
(
previewAudioPath
));
recordSoundOff
.
play
(
MediaActionSound
.
FOCUS_COMPLETE
);
return
true
;
...
...
@@ -606,6 +605,7 @@ public class EditPictoActivity extends Activity {
tiempoTotal
=
Math
.
round
(
mPlayer
.
getDuration
()/
1000
);
textoTTotal
.
setText
(
"00:00 | 00:"
+(
tiempoTotal
==
10
?
tiempoTotal
:
"0"
+
tiempoTotal
));
barraReproducir
.
setMax
(
tiempoTotal
);
Log
.
i
(
DEBUG_MESSAGE
,
"Assign.."
+
tiempoTotal
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalStateException
e
){
...
...
@@ -661,7 +661,6 @@ public class EditPictoActivity extends Activity {
private
void
reiniciarGrabacion
(){
tiempoGrabado
=
0
;
textoTGrabacion
.
setText
(
"00:00 | 00:10"
);
//hayGrabacion = false;
}
private
void
reiniciarReproducci
ó
n
(){
...
...
@@ -670,6 +669,8 @@ public class EditPictoActivity extends Activity {
reproduciendo
=
false
;
botonReproducir
.
setImageResource
(
android
.
R
.
drawable
.
ic_media_play
);
textoTTotal
.
setText
(
"00:00 | 00:"
+(
tiempoTotal
==
10
?
tiempoTotal
:
"0"
+
tiempoTotal
));
Log
.
i
(
DEBUG_MESSAGE
,
"Reinic.."
+
tiempoTotal
);
barraReproducir
.
setMax
(
tiempoTotal
);
}
@Override
...
...
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