issue #686 y #684 closed

parent 0816363f
...@@ -54,7 +54,7 @@ public class TTSHelper { ...@@ -54,7 +54,7 @@ public class TTSHelper {
Set<Voice> voices = this.ttobj.getVoices(); Set<Voice> voices = this.ttobj.getVoices();
if (voices!=null) if (voices!=null)
for (Voice avoice : voices) { for (Voice avoice : voices) { Log.i(context.getApplicationInfo().processName,"Voice "+avoice+" available");
if (avoice.getName().equalsIgnoreCase(voice)) { if (avoice.getName().equalsIgnoreCase(voice)) {
this.ttobj.setVoice(avoice); this.ttobj.setVoice(avoice);
this.voice_ok=true; this.voice_ok=true;
......
...@@ -95,7 +95,7 @@ public class PictoItemViewGenerator { ...@@ -95,7 +95,7 @@ public class PictoItemViewGenerator {
mirror_color++; mirror_color++;
pictoImage.setScaleX(scale[mirror_color%scale.length]); pictoImage.setScaleX(scale[mirror_color%scale.length]);
pictoImage.setScaleY(scale[mirror_color%scale.length]); pictoImage.setScaleY(scale[mirror_color%scale.length]);
// layout.setBackgroundColor(color[mirror_color%color.length]); if (picto.is_highlight_background()) layout.setBackgroundColor(color[mirror_color%color.length]);
} }
} }
} catch (IOException e) { } catch (IOException e) {
......
...@@ -132,7 +132,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener { ...@@ -132,7 +132,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener {
public void action(action action, int picto_cat, int picto_id) { public void action(action action, int picto_cat, int picto_id) {
Log.i(this.getClass().getCanonicalName(), action + " from " + picto_cat + "," + picto_id + " catched"); Log.i(this.getClass().getCanonicalName(), action + " from " + picto_cat + "," + picto_id + " catched");
Picto picto = vocabulary.get_picto(picto_cat, picto_id); Picto picto = vocabulary.get_picto(picto_cat, picto_id);
PictogramActivity.this.execHighligthFeeback(picto); PictogramActivity.this.execHighligthFeeback(picto, true);
} }
}); });
this.vocabulary.setImgDownloaderListener(new iImgDownloaderListener() { this.vocabulary.setImgDownloaderListener(new iImgDownloaderListener() {
...@@ -724,12 +724,13 @@ public class PictogramActivity extends Activity implements iVocabularyListener { ...@@ -724,12 +724,13 @@ public class PictogramActivity extends Activity implements iVocabularyListener {
if (PictogramActivity.this.feedback_read)
PictogramActivity.this.tts.play(p.get_translation());
if ( p != null && p.get_id() != 0 && !p.is_invisible() && p.is_enabled()) { if ( p != null && p.get_id() != 0 && !p.is_invisible() && p.is_enabled()) {
Log.d(LOG_TAG, "Clic en picto: " + p.toString()); Log.d(LOG_TAG, "Clic en picto: " + p.toString());
p.set_mirror(false); if (PictogramActivity.this.feedback_read && !p.is_category())
PictogramActivity.this.tts.play(p.get_translation());
p.set_mirror(false,false);
LinkedList<Picto> ll = sort(PCBcontext.getVocabulary().next(p)); LinkedList<Picto> ll = sort(PCBcontext.getVocabulary().next(p));
//LinkedList<Picto> ll = vocabulary.next(p); //LinkedList<Picto> ll = vocabulary.next(p);
Log.d(LOG_TAG, "Lista de pictos recuperada: " + ll.toString()); Log.d(LOG_TAG, "Lista de pictos recuperada: " + ll.toString());
...@@ -754,18 +755,18 @@ public class PictogramActivity extends Activity implements iVocabularyListener { ...@@ -754,18 +755,18 @@ public class PictogramActivity extends Activity implements iVocabularyListener {
showPictoMainGridView(); showPictoMainGridView();
PCBcontext.getActionLog().log(new TalkAction(TalkAction.ADD, p)); PCBcontext.getActionLog().log(new TalkAction(TalkAction.ADD, p));
if (PictogramActivity.this.feedback_read) PictogramActivity.this.tts.play(p.get_translation()); if (PictogramActivity.this.feedback_read) PictogramActivity.this.tts.play(p.get_translation());
if (PictogramActivity.this.feedback_highlight) execHighligthFeeback(p); if (PictogramActivity.this.feedback_highlight) execHighligthFeeback(p,false);
} }
private void execHighligthFeeback(final Picto picto) { private void execHighligthFeeback(final Picto picto,boolean highlight_background) {
boolean same_picto = false; boolean same_picto = false;
picto.set_mirror(true); //comienza feedback picto.set_mirror(true,highlight_background); //comienza feedback
if (exec_mirror != null) { //se cancela ejecución del feedbcack anterior, si lo hay if (exec_mirror != null) { //se cancela ejecución del feedbcack anterior, si lo hay
exec_mirror.shutdown(); exec_mirror.shutdown();
exec_mirror = null; exec_mirror = null;
} }
if (prev_picto != null) { //se cancela marca de feedback del anterior, si lo hay if (prev_picto != null) { //se cancela marca de feedback del anterior, si lo hay
prev_picto.set_mirror(false); prev_picto.set_mirror(false,false);
same_picto=prev_picto == picto; same_picto=prev_picto == picto;
} }
if (same_picto) if (same_picto)
...@@ -781,7 +782,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener { ...@@ -781,7 +782,7 @@ public class PictogramActivity extends Activity implements iVocabularyListener {
public void run() { public void run() {
refresh(); refresh();
if (repeating++ == 20) { if (repeating++ == 20) {
picto.set_mirror(false); picto.set_mirror(false,false);
if (exec_mirror != null) { if (exec_mirror != null) {
exec_mirror.shutdown(); exec_mirror.shutdown();
exec_mirror = null; exec_mirror = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment