I’m working with Android code that I’ve inherited. In the application’s main activity, it’s creating a new activity using new:
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
downloadActivity = new DownloadActivity(this);
}
Is this kosher? It doesn’t feel right to me as I’ve always thought the best way to create an Activity is through an Intent.
Smells like ham to me. Why would you want to do that? I’m assuming the dev wants to use the methods and fields defined in the activity… But it’s more Kosher (glatt) to create a different class and do everything there