mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
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:
parent
63b2016d3c
commit
09e0fb3af3
|
@ -50,8 +50,8 @@
|
||||||
<string name="contents_phone">Номер телефона</string>
|
<string name="contents_phone">Номер телефона</string>
|
||||||
<string name="contents_sms">Адрес для SMS</string>
|
<string name="contents_sms">Адрес для SMS</string>
|
||||||
<string name="contents_text">Текст</string>
|
<string name="contents_text">Текст</string>
|
||||||
<string name="history_clear_one_history_text">Очистить</string>
|
<string name="history_clear_one_history_text">Удалить</string>
|
||||||
<string name="history_clear_text">Очистить историю</string>
|
<string name="history_clear_text">Удалить историю</string>
|
||||||
<string name="history_email_title">История сканирования</string>
|
<string name="history_email_title">История сканирования</string>
|
||||||
<string name="history_empty">Пусто</string>
|
<string name="history_empty">Пусто</string>
|
||||||
<string name="history_empty_detail">Нет сохраненных штрих-кодов</string>
|
<string name="history_empty_detail">Нет сохраненных штрих-кодов</string>
|
||||||
|
|
|
@ -58,6 +58,10 @@ public final class HistoryActivity extends ListActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
reloadHistoryItems();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reloadHistoryItems() {
|
||||||
List<HistoryItem> items = historyManager.buildHistoryItems();
|
List<HistoryItem> items = historyManager.buildHistoryItems();
|
||||||
adapter.clear();
|
adapter.clear();
|
||||||
for (HistoryItem item : items) {
|
for (HistoryItem item : items) {
|
||||||
|
@ -92,7 +96,7 @@ public final class HistoryActivity extends ListActivity {
|
||||||
public boolean onContextItemSelected(MenuItem item) {
|
public boolean onContextItemSelected(MenuItem item) {
|
||||||
int position = item.getItemId();
|
int position = item.getItemId();
|
||||||
historyManager.deleteHistoryItem(position);
|
historyManager.deleteHistoryItem(position);
|
||||||
finish();
|
reloadHistoryItems();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue