Skip to content

Commit

Permalink
Added onActivityResult
Browse files Browse the repository at this point in the history
  • Loading branch information
arepina committed Jan 12, 2018
1 parent 9df359c commit ff7665e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
finish();
return true;
case R.id.m_apply:
ActionBar actionBar = getSupportActionBar();
actionBar.setTitle(milestone.title);
milestone.title = titleText.getText().toString();
milestone.description = descriptionText.getText().toString();
SimpleDateFormat sd = new SimpleDateFormat("dd-MM-yyyy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ public void onCreate(Bundle savedInstanceState) {

Bundle bundle = getArguments();
if(bundle != null && bundle.getSerializable(EXTRA_MILESTONE) != null)
try {
milestone = ((com.github.mobile.api.model.Milestone) bundle.getSerializable(EXTRA_MILESTONE)).getOldModel();
}
catch (ClassCastException e)
{
e.printStackTrace();
}
milestone = ((com.github.mobile.api.model.Milestone)bundle.getSerializable(EXTRA_MILESTONE)).getOldModel();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static com.github.mobile.RequestCodes.MILESTONE_VIEW;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.Loader;
import android.view.View;
Expand Down Expand Up @@ -101,4 +102,13 @@ public void onListItemClick(ListView l, View v, int position, long id) {
protected int getErrorMessage(Exception exception) {
return R.string.error_milestones_load;
}

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(MILESTONE_VIEW == requestCode)
{
//todo
}
}
}

0 comments on commit ff7665e

Please sign in to comment.