I have a class that is called when my application starts.
public class MainActivity extends Activity implements NetworkEvent.
In this situation
list = (ListView) findViewById(R.id.list);
works great. However, if I then name the new intention with:
String[] names = object.names();
Intent myIntent = new Intent (MainActivity.this, SimpleList.class); myIntent.putExtra ("names", names); startActivityForResult (myIntent, 0);
where SimpleList is defined as:
public class SimpleList extends ListActivity implements NetworkEvent
then when i call
list=(ListView) findViewById(R.id.list);
Log.i ("MyApp", "List:" + list);
from the SimpleList class, null: (
How did it happen? Both classes are in the same package.
Thank.
source
share