package kis.agh.edu.pl.childrensupervisiorandroid;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class TaskItemFragment extends Fragment {


    public static TaskItemFragment newInstance() {
        TaskItemFragment fragment = new TaskItemFragment();
        return fragment;
    }

    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.task_description_layout, container, false);

        return view;
    }

    @Override
    public void onResume() {
        super.onResume();
        ((MainActivity) getActivity()).getSupportActionBar().setTitle("Task summary");
    }

}

@@ -136,16 +136,106 @@
 flater;%0A
+import android.view.Menu;%0Aimport android.view.MenuInflater;%0Aimport android.view.MenuItem;%0A
 import a
@@ -252,16 +252,16 @@
 w.View;%0A
-
 import a
@@ -334,16 +334,55 @@
 ment %7B%0A%0A
+    private MainActivity mainActivity;%0A
 %0A    pub
@@ -740,17 +740,102 @@
 false);%0A
+        mainActivity=((MainActivity) getActivity());%0A        setHasOptionsMenu(true);
 %0A
-
         
@@ -931,19 +931,17 @@
         
-((M
+m
 ainActiv
@@ -943,32 +943,16 @@
 Activity
-) getActivity())
 .getSupp
@@ -991,16 +991,408 @@
 mmary%22);
+%0A%0A    %7D%0A%0A    @Override%0A    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) %7B%0A        inflater.inflate(R.menu.task_description_menu, menu);%0A    %7D%0A%0A    @Override%0A    public boolean onOptionsItemSelected(MenuItem item) %7B%0A        int id = item.getItemId();%0A        switch (id) %7B%0A            case R.id.addPhotoAction:%0A                return true;%0A        %7D%0A%0A        return false;
 %0A    %7D%0A%0A

add menu to appbar