track on map with toast

storage_ts_index
Georg Lukas 2011-04-08 21:49:56 +02:00
rodzic a4b6e93c61
commit c9edb25ce5
3 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -15,6 +15,7 @@
<!-- Maps activity -->
<string name="sta_lastreport">%s Last Report</string>
<string name="map_track_call">Tracking %s...</string>
<!-- AprsService -->

Wyświetl plik

@ -69,7 +69,7 @@ class StationActivity extends ListActivity with OnClickListener {
if (targetcall == call) {
// click on own callssid
startActivity(new Intent(this, classOf[MapAct]).putExtra("call", call));
uihelper.trackOnMap(call)
} else {
startActivity(new Intent(this, classOf[StationActivity]).putExtra("call", call));
finish()
@ -80,7 +80,7 @@ class StationActivity extends ListActivity with OnClickListener {
override def onClick(view : View) {
view.getId match {
case R.id.mapbutton =>
startActivity(new Intent(this, classOf[MapAct]).putExtra("call", targetcall))
uihelper.trackOnMap(targetcall)
case R.id.aprsfibutton =>
val url = "http://aprs.fi/?call=%s".format(targetcall)
startActivity(new Intent(Intent.ACTION_VIEW,

Wyświetl plik

@ -13,6 +13,12 @@ class UIHelper(ctx : Activity, menu_id : Int, prefs : PrefsWrapper)
var openedPrefs = false
def trackOnMap(call : String) {
val text = ctx.getString(R.string.map_track_call, call)
Toast.makeText(ctx, text, Toast.LENGTH_SHORT).show()
ctx.startActivity(new Intent(ctx, classOf[MapAct]).putExtra("call", call))
}
def openPrefs(toastId : Int) {
if (openedPrefs) {
// only open prefs once, exit app afterwards