I have tested a little application, which call from a first class a method owned by a second class. Hier is the code:
first class:
Using java Syntax Highlighting
- import android.app.Activity;
- import android.os.Bundle;
- public class Erste extends Activity {
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- Zweite zweite = new Zweite();
- zweite.drucken();
- }
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
second class:
Using java Syntax Highlighting
- import android.app.Activity;
- import android.os.Bundle;
- import android.widget.TextView;
- public class Zweite extends Activity {
- private int counter;
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- counter = 10;
- }
- public void drucken (){
- TextView tv = new TextView(this);
- tv.setText("\n\nWelcome to the World of ... (counter: " + counter + ")");
- setContentView(tv);
- }
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
the xml-file:
Using xml Syntax Highlighting
- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.ANDJ">
- <application android:icon="@drawable/icon">
- <activity android:name=".Erste" android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- <activity android:name=".Zweite" android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
- </manifest>
Parsed in 0.004 seconds, using GeSHi 1.0.8.4
when I start the debug-mode, the display on emulator stay black, but I can see the application name. Eclipse opens the "Class File Editor - Source not found" ActivityThread.class..
Whats my problem??
Thx




