onActivityResult()
is not getting called. Below is my code:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// Check which request we're responding to
Log.e("CALLED", "OnActivity Result");
if (requestCode == TEAM_SELECTED_REQUEST_CODE) {
// Make sure the request was successful
if (resultCode == RESULT_OK) {
try {
mySelectedTeam = getIntent().getStringExtra("teamName");
txtSelectTeamCreateMatch.setText(mySelectedTeam);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
Here's I'm starting the SelectTeamActivity
:
Intent intent=new Intent(CreateMatch.this,SelectTeamActivity.class);
startActivityForResult(intent, TEAM_SELECTED_REQUEST_CODE);
//overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
overridePendingTransition(R.anim.push_up_in, R.anim.push_up_out);
Intent intent = getIntent();
intent.putExtra("teamID", teamDataList.get(position).getTeamId().toString());
intent.putExtra("teamName", teamDataList.get(position).getTeamName().toString());
setResult(1, intent);