I am begginner for android and want to develop something. I have a question about using more than one activity. I create two activity and invoke the others by intent. I use that code part :
Intent intent = new Intent(MainScreen.this,GetNearestPlaceActivity.class);
startActivity(intent);
and it calls the other but i get an runtime error after invoking the second activity(application has sstopped unexpectedly). The second activity is dummy i just tried to achieve to intent. The code sample for second activity is :
public class GetNearestPlaceActivity extends Activity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
}
}
Is the problem is using same layout xml file? Do i have to use different xml file for every activity?