|
Ordenar uma lista de objetos (List) |
|
|
|
|
Escrito por Administrator
|
|
Qui, 04 de Fevereiro de 2010 12:07 |
Collections.sort(listaProjetos, new Comparator() { public int compare(Object arg0, Object arg1) { CoverageProjeto x = (CoverageProjeto)arg0; CoverageProjeto y = (CoverageProjeto)arg1; return x.getID().compareToIgnoreCase(y.getID()); } } ); |
|
|
Implementando TextToSpeech no Android |
|
|
|
|
Escrito por Administrator
|
|
Qua, 03 de Fevereiro de 2010 15:57 |
|
Uma pequena implementação bem simples do TextToSpeech para android package com.TesteSpeech;
import java.util.Locale;
import android.app.Activity; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android.speech.tts.TextToSpeech.OnInitListener;
public class TesteSpeechActivity extends Activity implements OnInitListener{ private TextToSpeech mTts = null; private boolean _ttsActive = false; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); }
@Override public void onPause(){ super.onPause();
try{ // Stop talking when we lose focus if (mTts != null){ mTts.stop(); _ttsActive = false; } }catch(Exception e){} } @Override public void onResume(){ super.onResume(); mTts = new TextToSpeech(getApplicationContext(), this); } @Override public void onDestroy(){ super.onDestroy(); try{ // We're closing down so kill it with fire. if (mTts != null){ mTts.shutdown(); mTts = null; } //powerLock.release(); } catch(Exception e){} } @Override public void onInit(int status) { // If the TTS init is successful set a flag to say we can be used; say hello if (status == TextToSpeech.SUCCESS){ _ttsActive = true; mTts.isLanguageAvailable(new Locale("pt", "BR")); mTts.speak("Ray da Costa aprendendo Android",TextToSpeech.QUEUE_FLUSH, null); } }
} |
|
Pequenas empresas apostam no mercado de software |
|
|
|
|
Escrito por Ray da Costa
|
|
Seg, 01 de Fevereiro de 2010 13:31 |
http://video.globo.com/Videos/Player/Noticias/0,,GIM1003363-7823-PEQUENAS+EMPRESAS+APOSTAM+NO+MERCADO+DE+SOFTWARE,00.html
|
|
Última atualização em Seg, 01 de Fevereiro de 2010 13:36 |
|
|
Escrito por Administrator
|
|
Ter, 02 de Fevereiro de 2010 13:35 |
|
Como pegar as propriedades do System.Properties do Java. Properties pr = System.getProperties(); TreeSet propKeys = new TreeSet(pr.keySet()); for (Iterator it = propKeys.iterator(); it.hasNext(); ) { String key = (String)it.next(); System.out.println("" + key + "=" + pr.get(key) + "\n"); }
Ou
String userDir = System.getProperty("user.dir"); |
|
Mercado de informática é promissor para 2010 |
|
|
|
|
Escrito por Administrator
|
|
Seg, 01 de Fevereiro de 2010 12:36 |
|
|
|
|
|
|
|
|
Página 5 de 8 |