add option to clear the log

storage_ts_index
Georg Lukas 2011-03-18 21:38:55 +01:00
rodzic f071adb0e3
commit a9fb3fe2e0
3 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -3,6 +3,10 @@
android:title="@string/preferences" android:title="@string/preferences"
android:alphabeticShortcut="p" android:alphabeticShortcut="p"
android:icon="@android:drawable/ic_menu_preferences" /> android:icon="@android:drawable/ic_menu_preferences" />
<item android:id="@+id/clear"
android:title="@string/clear_log"
android:alphabeticShortcut="c"
android:icon="@android:drawable/ic_menu_close_clear_cancel" />
<item android:id="@+id/about" <item android:id="@+id/about"
android:title="@string/about" android:title="@string/about"
android:alphabeticShortcut="a" android:alphabeticShortcut="a"

Wyświetl plik

@ -64,6 +64,7 @@
<string name="about">About</string> <string name="about">About</string>
<string name="show_map">Show Map</string> <string name="show_map">Show Map</string>
<string name="show_log">Show Log</string> <string name="show_log">Show Log</string>
<string name="clear_log">Clear Log</string>
<string name="quit">Quit</string> <string name="quit">Quit</string>
<string name="preferences">Preferences</string> <string name="preferences">Preferences</string>
<!-- preferences --> <!-- preferences -->

Wyświetl plik

@ -174,6 +174,10 @@ class APRSdroid extends Activity with OnClickListener
case R.id.preferences => case R.id.preferences =>
startActivity(new Intent(this, classOf[PrefsAct])); startActivity(new Intent(this, classOf[PrefsAct]));
true true
case R.id.clear =>
storage.trimPosts(System.currentTimeMillis)
postcursor.requery()
true
case R.id.about => case R.id.about =>
aboutDialog() aboutDialog()
true true