In my main activity is there a difference between loading a view as an intent or using setContentView?
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
Or is this better? Not sure what the differnce is if they both load the layout file?
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent i = new Intent(MainActivity.this, CalculateTip.class);
startActivity(i);
}
}