Probleme mit startActivity

  • 2 Antworten
  • Letztes Antwortdatum
F

Ferro79de

Neues Mitglied
0
Hallo Zusammen,
ich bin gerade dabei mich in die Android App Programmierung einzuarbeiten und verzweifel gleich daran eine neue Activity zu starten. Leider sehe ich den Fehler nicht (liegt wohl an der Perspektive). Habe bereits das Forum durchsucht sowie Google um Hilfe gefragt. Alles was ich finden konnte mehrfach kontrolliert. Wohl doch die Perspektive. Ein Logging habe ich noch nicht, aber werde dies bei gelegenheit mal einbauen.

anbei der Code (schnipsel)

Aufruf:
Code:
Intent intent = new Intent(this,TrainingActivity.class);
startActivity(intent);
Manifest:
Code:
...
</activity>
<activity
            android:name=".TrainingActivity"
            android:label="@string/title_activity_training" >
</activity>
</application>
...
habe es auch mit <activity .... /> probiert.
die Klasse:
Code:
public class TrainingActivity extends Activity {
        public void onCreate(Bundle a) {
            super.onCreate(a);
            setContentView(R.layout.activity_training);  
        }
}
Layout:
Code:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:paddingLeft="5dp"
    android:paddingRight="5dp" >

    <TextView
        android:id="@+id/taTitle"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>
....
</LinearLayout>
 
Code:
Intent intent = new Intent()[B].setClass([/B]this, TrainingsActivity.class);
startActivity(intent);
;)

Ich hoffe ich konnte helfen.

Greets,
Max
 
=> logcat hilft sicher weiter
 
Zurück
Oben Unten