kopia lustrzana https://github.com/ge0rg/aprsdroid
track on map with toast
rodzic
a4b6e93c61
commit
c9edb25ce5
|
@ -15,6 +15,7 @@
|
|||
|
||||
<!-- Maps activity -->
|
||||
<string name="sta_lastreport">%s Last Report</string>
|
||||
<string name="map_track_call">Tracking %s...</string>
|
||||
|
||||
|
||||
<!-- AprsService -->
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue