Code example for ListFragment

Methods: startActivityForResult

0
     
    private void opennotificationtypeedit(NotificationType mynotificationtype){
    	 
    	Intent i = new Intent(myContext, NotificationTypeEdit.class);
    	i.putExtra("mynotificationtype", mynotificationtype);
    	startActivityForResult(i, RESULT_NOTIFICATION_EDIT);
 
    }        
     
    @Override 
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		 
		mydevicelog.log("requestCode:"+requestCode+" resultCode:"+resultCode, Log.DEBUG);
 
		NotificationType returnnotificationtype;
		 
		if (resultCode == RESULT_SAVE && requestCode == RESULT_NOTIFICATION_EDIT) {
	    	if (data.hasExtra("mynotificationtype")) {
	    		returnnotificationtype = (NotificationType) data.getSerializableExtra("mynotificationtype");
	    		 
	    		saveNotificationType(returnnotificationtype);