I am trying to test the progress of my program so far with a statement. The
statement is within an activity that is called by another activity before,
and that one is called by another activity before that (so an activity
within an activity within an activity). The problem is when I run the
program, I come into an error that says ActvityNotFoundException and the
emulator has to force close, however, all my classes extend the Activity
class. I am not sure how to solve the problem since I do not think I should
have one. I uploaded my files to allow for checking.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
package com.maclinCode;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
public class EditLibrary extends Activity{
TextView tv;
String out;
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.editlib);
tv = (TextView) findViewById(R.id.tview);
Intent intent = getIntent();
out = intent.getStringExtra("Input");
tv.setText(out);
}
}
package com.maclinCode;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class FileCreation extends Activity{
EditText tv;
Button ok;
String name;
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.createfile);
ok = (Button) findViewById(R.id.OK);
tv = (EditText) findViewById(R.id.FileName);
name = tv.getText().toString();
//creates the library file
ok.setOnClickListener(new View.OnClickListener() {
//transfers to edit library after file creation
public void onClick(View v) {
Intent edit = new Intent(FileCreation.this, EditLibrary.class);
edit.putExtra("Input", name);
startActivity(edit);
}
});
}
}
package com.maclinCode;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class GameLibraryActivity extends Activity {
/** Called when the activity is first created. */
Button create, edit, view, delete, wanted;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
create = (Button) findViewById(R.id.create);
edit = (Button) findViewById(R.id.edit);
view = (Button) findViewById(R.id.view);
delete = (Button) findViewById(R.id.delete);
wanted = (Button) findViewById(R.id.want);
//creates the file for the directory
create.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent i = new Intent(GameLibraryActivity.this, FileCreation.class);
startActivity(i);
}
});
// edit.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v) {
//
//
// }
// });
//
// view.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v) {
//
//
// }
// });
//
// delete.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v) {
//
//
// }
// });
//
// wanted.setOnClickListener(new View.OnClickListener() {
// public void onClick(View v) {
//
//
// }
// });
}
}