Domanda

I have a ListActivity that is started with startActivityForResult by a PreferenceActivity.

On ListItemClick, I want to return with a result to my PreferenceActivity.

How do I do this? When will onActivityResult be called?

È stato utile?

Soluzione

Call this on List Item Click Event.

Intent data = new Intent();
data.putExtra("SOMETHING", "EXTRAS");
setResult(RESULT_OK, data); 
finish();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top