private void update() {
    // TODO reload all fields based on new info from model

    // Loads title
    if (fragmentTitleTextView != null) fragmentTitleTextView.setText(fragment.getTitle());

    // Loads fragment parts (text, images, videos, sounds, etc)
    adapter = new FragmentPartAdapter(this, R.layout.activity_fragment_editor, fragment);
    fragmentPartListView.setAdapter(adapter);

    Log.d(TAG, "UPDATE");
    Log.d(TAG, fragment.getAnnotations().toString());
    Log.d(TAG, "size" + fragment.getAnnotations().size());
    File file;
    for (int i = 0; i < fragment.getAnnotations().size(); i++) {
      file = new File(fragment.getAnnotations().get(i));
      Log.d(TAG, "" + file.getAbsoluteFile());
      if (file.exists()) {
        Log.d(TAG, "existis");
        if (i == 0) viewImage.setImageBitmap(BitmapFactory.decodeFile(file.getAbsolutePath()));
        if (i == 1) viewImage2.setImageBitmap(BitmapFactory.decodeFile(file.getAbsolutePath()));
        if (i == 2) viewImage3.setImageBitmap(BitmapFactory.decodeFile(file.getAbsolutePath()));
      }
    }
  }
 @Override
 protected void onDestroy() {
   super.onDestroy();
   fragment.deleteView(this);
 }
 @Override
 protected void onStart() {
   super.onStart();
   fragment.addView(this);
 }