CustomDialog vs. Activity with theme.dialog?

If so you just need to handle the onActivityResult() method on the Activity that is used as the context for the new Intent and make sure in the called Activity that you use setResult() and finish().. In the called Activity.. setResult(RESULT_OK, /* Some Intent with Data should go here */ null); finish(); In the calling Activity.. @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super. OnActivityResult(requestCode, resultCode, data); /* Handle result and extract data from Intent */ }.

" Yes and the issue is that I don't know how to call startActivityForResult from my own thread. Using context I can call only startActivity method. – Houp Aug 19 at 20:33 @Houp I understand but is that not your context is from to begin with?

If so you could cast ((Activity)context). StartActivityForResult(). If you are using something else (like a more global application context) then you will not be able to do this and might want to refactor to pass the activity context if possible, otherwise you might have to use a more accessible object for interaction.

– Quintin Robinson Aug 19 at 20:43 Thank you Quintin, this is working. However, why is necessary to convert context to Activity class? Why context class hasn't method startActivityForResult?

– Houp Aug 19 at 21:03 @Houp You bet, glad it is working. I wish I could tell you the reason for the generic Context class not having the startActivityForResult() method but I must confess that I have not investigated the implementation to determine the exact reason.My assumption would be that the Context is meant to be lightweight and not encumbered by all the data necessary to interact with an Activity. – Quintin Robinson Aug 19 at 21:08 @Houp I also noticed you are new here, to help the community and the future inquirers in resolving their issues in a quick manner you should mark the answer that resolved your issue as the accepted answer.

You can review the faq (stackoverflow.Com/faq#howtoask) as to how to accomplish this and for further etiquette on stackoverflow, welcome to the community! – Quintin Robinson Aug 19 at 21:12.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions