+ @Override\r
+ public boolean onListItemLongClick(ListView l, View v, int position, long id) {\r
+ \r
+ Object o = getExpandableListAdapter().getGroup(position);\r
+ \r
+ if ( o == null || ! (o instanceof String) ) {\r
+ return false;\r
+ }\r
+ final String motorConfigId = (String)o;\r
+ \r
+ AlertDialog.Builder b = new AlertDialog.Builder( getActivity() );\r
+ b.setTitle(R.string.DeleteConfigTitle);\r
+ b.setCancelable(true);\r
+ b.setPositiveButton(R.string.Delete, new DialogInterface.OnClickListener() {\r
+ @Override\r
+ public void onClick(DialogInterface dialog, int which) {\r
+ Configurations.this.removeConfiguration(motorConfigId);\r
+ }\r
+ \r
+ });\r
+ \r
+ Dialog dialog = b.create();\r
+ \r
+ dialog.setCanceledOnTouchOutside(true);\r
+ dialog.show();\r
+ return true;\r
+ }\r
+\r