diff --git a/APED/app/src/main/java/com/example/aped/ui/plots/PlotFragment.java b/APED/app/src/main/java/com/example/aped/ui/plots/PlotFragment.java index e36cd73..16f726b 100644 --- a/APED/app/src/main/java/com/example/aped/ui/plots/PlotFragment.java +++ b/APED/app/src/main/java/com/example/aped/ui/plots/PlotFragment.java @@ -36,8 +36,6 @@ public class PlotFragment extends Fragment { private List bufferedDevices; /** Line Chart View that is displayed **/ private GraphView graphView; - /** List of all the devices with buffers. **/ - private List bufferedDevicesSelected; /** maximum value on X axis. **/ private int maxX = 0; @@ -62,38 +60,6 @@ public class PlotFragment extends Fragment { getBufferedValues(mainActivity.getDelivery(), mainActivity.getXml()); mainActivity.getConfigurationHandler().setCurrentView(R.id.nav_plots); - Button buttonChoseDevice = view.findViewById(R.id.button_alert); - buttonChoseDevice.setOnClickListener(new View.OnClickListener() { - - @Override - public void onClick(final View v) { - bufferedDevicesSelected = new ArrayList<>(); - MaterialAlertDialogBuilder alertDialogBuilder = new MaterialAlertDialogBuilder(mainActivity); - alertDialogBuilder.setTitle("Choose your devices"); - alertDialogBuilder.setMultiChoiceItems(bufferedDevices.toArray(new String[bufferedDevices.size()]), null, new DialogInterface.OnMultiChoiceClickListener() { - @Override - public void onClick(final DialogInterface dialog, final int which, final boolean isChecked) { - if (isChecked) { - bufferedDevicesSelected.add(bufferedDevices.get(which)); - } else if (bufferedDevices.contains(bufferedDevices.get(which))) { - bufferedDevicesSelected.remove(bufferedDevices.get(which)); - } - } - }); - alertDialogBuilder.setPositiveButton("display", new DialogInterface.OnClickListener() { - @Override - public void onClick(final DialogInterface dialog, final int which) { - String data = ""; - for (String item:bufferedDevicesSelected) { - data = data + " " + item; - } - Toast.makeText(mainActivity, data, Toast.LENGTH_SHORT).show(); - } - }); - alertDialogBuilder.create(); - alertDialogBuilder.show(); - } - }); return view; } diff --git a/APED/app/src/main/res/layout/fragment_plot.xml b/APED/app/src/main/res/layout/fragment_plot.xml index 3cb85a9..5a466a8 100644 --- a/APED/app/src/main/res/layout/fragment_plot.xml +++ b/APED/app/src/main/res/layout/fragment_plot.xml @@ -11,13 +11,4 @@ android:id="@+id/graph"/> android:layout_height="match_parent"/> -