Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laurent Besacier
lig-aikuma
Commits
f4482779
Commit
f4482779
authored
May 02, 2016
by
CallisteHanriat
Browse files
Merge branch 'calliste-undo' into calliste-differenciation-dialog
parents
6b711b0c
0de789f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Aikuma/src/org/lp20/aikuma/ui/ThumbRespeakFragment.java
View file @
f4482779
...
...
@@ -57,7 +57,7 @@ public class ThumbRespeakFragment extends Fragment {
@Override
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
View
v
=
inflater
.
inflate
(
R
.
layout
.
thumb_respeak_fragment
,
container
,
false
);
v
=
inflater
.
inflate
(
R
.
layout
.
thumb_respeak_fragment
,
container
,
false
);
installButtonBehaviour
(
v
);
textTimeProgression
=
(
TextView
)
v
.
findViewById
(
R
.
id
.
respeak_current_time
);
totalTime
=
(
TextView
)
v
.
findViewById
(
R
.
id
.
respeak_total_time
);
...
...
@@ -67,7 +67,7 @@ public class ThumbRespeakFragment extends Fragment {
@Override
public
void
onClick
(
View
v
)
{
//if undo is enabled, we disabled because we want to undo one time.
onUnd
i
Action
();
onUnd
o
Action
();
}
});
...
...
@@ -154,10 +154,9 @@ public class ThumbRespeakFragment extends Fragment {
@Override
public
boolean
onTouch
(
View
view
,
MotionEvent
event
)
{
if
(
event
.
getAction
()
==
MotionEvent
.
ACTION_DOWN
)
{
if
(
count
>
0
)
{
if
(
count
>
0
&&
undo
.
isEnabled
()
)
{
respeaker
.
saveRespeaking
();
}
// Color change
//playButton.setBackgroundColor(0xff00d500);
long
previousGestureTime
=
gestureTime
;
...
...
@@ -298,7 +297,6 @@ public class ThumbRespeakFragment extends Fragment {
public
void
run
()
{
// TODO Auto-generated method stub
textTimeProgression
.
setText
(
respeaker
.
getSimplePlayer
().
getCurrentMsec
()/
1000
+
"s"
);
}
});
seekBar
.
setProgress
(
...
...
@@ -372,10 +370,17 @@ public class ThumbRespeakFragment extends Fragment {
/**
* called when we need to return one state before.
*/
private
void
onUndiAction
()
{
if
(
count
==
1
||
undo
.
isEnabled
())
{
private
void
onUndoAction
()
{
if
(
count
==
1
){
final
ImageButton
okButton
=
(
ImageButton
)
v
.
findViewById
(
R
.
id
.
saveButton
);
okButton
.
setImageResource
(
R
.
drawable
.
ok_disabled_48
);
okButton
.
setEnabled
(
false
);
undo
.
setEnabled
(
false
);
}
else
if
(
undo
.
isEnabled
())
{
undo
.
setEnabled
(
false
);
}
setPreviousPlayerToListenFragment
();
deleteLastTempFile
();
respeaker
.
goToPreviousSample
();
...
...
@@ -493,6 +498,8 @@ public class ThumbRespeakFragment extends Fragment {
private
boolean
isCommented
=
true
;
private
int
count
=
0
;
private
View
v
;
private
Button
undo
;
public
static
final
String
TAG
=
"ThumbRespeakFragment"
;
...
...
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