ok hier ist der "Home"-Screen.
[fieldset]package hft.app.sascha;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Home extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button NewsButton = (Button)findViewById(R.id.NewsButton);
NewsButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,AndroidXMLParsingActivity.class);
startActivity(in);
}
});
Button HomeButton = (Button)findViewById(R.id.HomeButton);
HomeButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,Home.class);
startActivity(in);
}
});
Button StdPlanButton = (Button)findViewById(R.id.StdPlanButton);
StdPlanButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,A1.class);
startActivity(in);
}
});
Button HoersaalButton = (Button)findViewById(R.id.HoersaalButton);
HoersaalButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,HoersaalActivity.class);
startActivity(in);
}
});
Button MensaButton = (Button)findViewById(R.id.MensaButton);
MensaButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,MensaplanActivity.class);
startActivity(in);
}
});
Button MoreButton = (Button)findViewById(R.id.MoreButton);
MoreButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent in = new Intent(Home.this,AndroidListViewActivity.class);
startActivity(in);
}
});
}
}[/fieldset]
die main.xml dazu:
[fieldset]<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bib"
android:orientation="vertical" >
<Button
android:id="@+id/HomeButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="Home" />
<Button
android:id="@+id/MensaButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/HomeButton"
android:text="Mensa" />
<Button
android:id="@+id/StdPlanButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/MensaButton"
android:text="Stundenplan" />
<Button
android:id="@+id/NewsButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/StdPlanButton"
android:text="News" />
<Button
android:id="@+id/HoersaalButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/NewsButton"
android:text="Hoersaal" />
<Button
android:id="@+id/MoreButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/HoersaalButton"
android:text="+" />
</RelativeLayout>[/fieldset]
kann das sein, dass da was in der manifest nicht stimmt?
androidmanifest:
[fieldset]<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hft.app.sascha"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
-
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Home"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Nachrichten -->
<activity
android:name=".AndroidXMLParsingActivity"
android:label="Nachrichten" >
</activity>
<activity
android:name="SingleMenuItemActivity"
android:label="Nachrichten" />
<!-- Stundenplan -->
<activity
android:name=".A1"
android:label="@string/app_name" >
</activity>
<activity android:name="D2" />
<activity android:name="D3" />
<activity android:name="WebViewActivity" />
<!-- Hoersaal -->
<activity
android:name=".HoersaalActivity"
android:label="@string/app_name" >
-
</activity>
<activity android:name="Bau1" />
<activity android:name="Bau2" />
<activity android:name="Bau3" />
<activity android:name="Bau4" />
<activity android:name="St0" />
<activity android:name="St1" />
<activity android:name="St2" />
<activity android:name="St3" />
<activity android:name="Bau2St0" />
<activity android:name="Bau2St1" />
<activity android:name="Bau2St2" />
<activity android:name="Bau2St3" />
<activity android:name="Bau3St0" />
<activity android:name="Bau3St1" />
<activity android:name="Bau3St2" />
<activity android:name="Bau3St3" />
<activity android:name="Bau4St0" />
<activity android:name="Bau4St1" />
<activity android:name="Bau4St2" />
<activity android:name="Bau4St3" />
<!-- Mensaplan -->
<activity android:name=".MensaplanActivity" >
</activity>
<activity android:name="WebViewActivity" />
<activity
android:name=".SWP_AppActivity"
android:label="@string/app_name" >
</activity>
</application>
<!-- More -->
<activity android:name=".AndroidListViewActivity" />
<activity android:name=".MoreWebView" />
</manifest>[/fieldset]
der Button mit den "News" will auch nicht mehr. ich vermute dass ich mir irgendwie die Manifest zerstört habe...
EDIT: http://www.hft-stuttgart.de/St…teressierte/index.html/de hier gibt es ein paar Infos zum IL-Studiengang.
Danke dir für deine Mühen!
Edit2: Fehlermeldung : The Application Final_HFT_App has stopped unexpectedly(process hft.app.sascha). Please try again later
logcat:
[fieldset ]
06-25 12:30:45.561: E/AndroidRuntime(361): FATAL EXCEPTION: main
06-25 12:30:45.561: E/AndroidRuntime(361): android.content.ActivityNotFoundException: Unable to find explicit activity class {hft.app.sascha/hft.app.sascha.AndroidListViewActivity}; have you declared this activity in your AndroidManifest.xml?
06-25 12:30:45.561: E/AndroidRuntime(361): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1404)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.app.Activity.startActivityForResult(Activity.java:2817)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.app.Activity.startActivity(Activity.java:2923)
06-25 12:30:45.561: E/AndroidRuntime(361): at hft.app.sascha.Home$6.onClick(Home.java:72)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.view.View.performClick(View.java:2408)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.view.View$PerformClick.run(View.java:8816)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.os.Handler.handleCallback(Handler.java:587)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.os.Handler.dispatchMessage(Handler.java:92)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.os.Looper.loop(Looper.java:123)
06-25 12:30:45.561: E/AndroidRuntime(361): at android.app.ActivityThread.main(ActivityThread.java:4627)
06-25 12:30:45.561: E/AndroidRuntime(361): at java.lang.reflect.Method.invokeNative(Native Method)
06-25 12:30:45.561: E/AndroidRuntime(361): at java.lang.reflect.Method.invoke(Method.java:521)
06-25 12:30:45.561: E/AndroidRuntime(361): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-25 12:30:45.561: E/AndroidRuntime(361): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-25 12:30:45.561: E/AndroidRuntime(361): at dalvik.system.NativeStart.main(Native Method)
06-25 12:30:49.121: I/Process(361): Sending signal. PID: 361 SIG: 9
[/fieldset]