package info.nightscout.androidaps.plugins.InsulinFastacting;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;

/**
 * Created by mike on 17.04.2017.
 */

public class InsulinFastactingFragment extends Fragment {
    static InsulinFastactingPlugin insulinFastactingPlugin = new InsulinFastactingPlugin();

    static public InsulinFastactingPlugin getPlugin() {
        return insulinFastactingPlugin;
    }

    TextView insulinName;
    TextView insulinComment;
    TextView insulinDia;
    ActivityGraph insulinGraph;

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

        insulinName = (TextView) view.findViewById(R.id.insulin_name);
        insulinComment = (TextView) view.findViewById(R.id.insulin_comment);
        insulinDia = (TextView) view.findViewById(R.id.insulin_dia);
        insulinGraph = (ActivityGraph) view.findViewById(R.id.insuling_graph);

        insulinName.setText(insulinFastactingPlugin.getFriendlyName());
        insulinComment.setText(insulinFastactingPlugin.getComment());
        insulinDia.setText(MainApp.sResources.getText(R.string.dia) + "  " + new Double(insulinFastactingPlugin.getDia()).toString() + "h");
        insulinGraph.show(insulinFastactingPlugin);

        return view;
    }

}

@@ -1249,24 +1249,202 @@
 ng_graph);%0A%0A
+        updateGUI();%0A%0A        return view;%0A    %7D%0A%0A    @Override%0A    public void onResume() %7B%0A        super.onResume();%0A        updateGUI();%0A    %7D%0A%0A    private void updateGUI() %7B%0A
         insu
@@ -1765,38 +1765,16 @@
 Plugin);
-%0A%0A        return view;
 %0A    %7D%0A%0A

Update InsulinFastactingFragment.java