Beiträge von Felix752698
-
-
wenn ich das @override darüber wegmache ist der fehler auch weg, aber hat das irgendwelche folgen?
-
thx
package de.androidnewcomer.saghallo;
import android.app.Activity;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import java.util.Locale;public class StartActivity extends Activity implements OnInitListener {
private TextToSpeech tts;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tts = new TextToSpeech(this, this);}
@Override
public void onInit(int arg0) {
tts.setLanguage(Locale.GERMAN);
tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
}}
-
Jetz siehts so aus
package de.androidnewcomer.saghallo;
import android.app.Activity;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import java.util.Locale;public class StartActivity extends Activity implements OnInitListener {
private TextToSpeech tts;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tts = new TextToSpeech(this, this);}
@Override
public void onInit(int arg0) {
tts.setlanguage (Locale.GERMAN);
tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
}}
-
Also, ich versuch grad meine erste app zu programmiern, welche hallo sagen soll, aber ich finde den fehler hier im quellcode nich, die rot markierten teile unten werden mir in eclipse als syntaxfehler unterstrichen, könnt ihr mir helfen? Bin ich zu doof?
THX im voraus, MFG Felixpackage de.androidnewcomer.saghallo;
import android.app.Activity;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import java.util.Locale;public class StartActivity extends Activity implements OnInitListener {
private TextToSpeech tts;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
tts = new TextToSpeech(this, this)}
@Override
public void onInit(int arg0) {
tts.setlanguage (locale.GERMAN)
tts.speak("Hallo!", TextToSpeech.QUEUE_FLUSH, null);
}}