Added clear button
This commit is contained in:
parent
6f1daa20ea
commit
9b407d2c94
3 changed files with 9 additions and 0 deletions
|
|
@ -78,6 +78,11 @@ public class EditActivity extends ListActivity implements AdapterView.OnItemClic
|
|||
selector.show(getFragmentManager(), "behaviour_selector");
|
||||
return true;
|
||||
}
|
||||
else if (id == R.id.action_clear) {
|
||||
executor.getBehaviourList().clear();
|
||||
adapter.notifyDataSetChanged();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,5 +5,8 @@
|
|||
<item android:id="@+id/action_add"
|
||||
android:title="@string/action_add"
|
||||
android:showAsAction="withText|ifRoom" />
|
||||
<item android:id="@+id/action_clear"
|
||||
android:title="@string/action_clear"
|
||||
android:showAsAction="withText|ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
|
|
|||
|
|
@ -35,5 +35,6 @@
|
|||
<string name="action_select">Select</string>
|
||||
<string name="pref_throughput_type">Throughput Type</string>
|
||||
<string name="pref_throughput_type_summ">The type of throughput that should be displayed and logged</string>
|
||||
<string name="action_clear">Clear</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue