Fixed crash issue when clearing behaviour list

This commit is contained in:
Ziver Koc 2015-01-15 15:59:37 +01:00
parent e18c09b39d
commit 55f983c773
2 changed files with 3 additions and 0 deletions

View file

@ -78,6 +78,7 @@ public class EditActivity extends ListActivity implements AdapterView.OnItemClic
} }
else if (id == R.id.action_clear) { else if (id == R.id.action_clear) {
executor.getBehaviourList().clear(); executor.getBehaviourList().clear();
adapter.generateIds();
adapter.notifyDataSetChanged(); adapter.notifyDataSetChanged();
return true; return true;
} }

View file

@ -22,7 +22,9 @@ public class Configurator {
@Retention(RetentionPolicy.RUNTIME) // Make this annotation accessible at runtime via reflection. @Retention(RetentionPolicy.RUNTIME) // Make this annotation accessible at runtime via reflection.
@Target({ElementType.FIELD}) // This annotation can only be applied to class fields. @Target({ElementType.FIELD}) // This annotation can only be applied to class fields.
public static @interface Configurable{ public static @interface Configurable{
/* Nice name of this parameter */
String value(); String value();
/* Defines the order the parameters, in ascending order */
int order() default Integer.MAX_VALUE; int order() default Integer.MAX_VALUE;
} }