Don't close history after clearing one item

git-svn-id: https://zxing.googlecode.com/svn/trunk@2447 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-10-03 10:05:44 +00:00
parent 63b2016d3c
commit 09e0fb3af3
2 changed files with 7 additions and 3 deletions

View file

@ -50,8 +50,8 @@
<string name="contents_phone">Номер телефона</string>
<string name="contents_sms">Адрес для SMS</string>
<string name="contents_text">Текст</string>
<string name="history_clear_one_history_text">Очистить</string>
<string name="history_clear_text">Очистить историю</string>
<string name="history_clear_one_history_text">Удалить</string>
<string name="history_clear_text">Удалить историю</string>
<string name="history_email_title">История сканирования</string>
<string name="history_empty">Пусто</string>
<string name="history_empty_detail">Нет сохраненных штрих-кодов</string>

View file

@ -58,6 +58,10 @@ public final class HistoryActivity extends ListActivity {
@Override
protected void onResume() {
super.onResume();
reloadHistoryItems();
}
private void reloadHistoryItems() {
List<HistoryItem> items = historyManager.buildHistoryItems();
adapter.clear();
for (HistoryItem item : items) {
@ -92,7 +96,7 @@ public final class HistoryActivity extends ListActivity {
public boolean onContextItemSelected(MenuItem item) {
int position = item.getItemId();
historyManager.deleteHistoryItem(position);
finish();
reloadHistoryItems();
return true;
}