views:

14

answers:

0

I know I can do this:

menu.findItem(R.id.menusettings)
 .setIntent(new Intent()
 .setClass(this,SettingsScreen.class));

Which is equivalent to this in a callback:

Intent myIntent = new Intent();
myIntent.setClass(this, SettingsScreen.class);
startActivity(myIntent);

But is there any way I can issue a startActivityForResult with a setIntent or equivalent?

Intent myIntent = new Intent();
myIntent.setClass(this, SettingsScreen.class);
startActivityForResult(myIntent, REQUEST_CODE_SETTINGS_SCREEN);

Ideally the call would look like this, but there is no such method defined.

menu.findItem(R.id.menusettings)
 .setIntentForResult(new Intent()
 .setClass(this,SettingsScreen.class), REQUEST_CODE_SETTINGS_SCREEN);