kopia lustrzana https://github.com/ge0rg/aprsdroid
refactor: rename station button ids
rodzic
acfc1ddf7d
commit
2a5b29f349
|
@ -37,7 +37,7 @@
|
|||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
>
|
||||
<Button
|
||||
android:id="@+id/mapbutton"
|
||||
android:id="@+id/map"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
@ -45,7 +45,7 @@
|
|||
>
|
||||
</Button>
|
||||
<Button
|
||||
android:id="@+id/aprsfibutton"
|
||||
android:id="@+id/aprsfi"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
@ -53,7 +53,7 @@
|
|||
>
|
||||
</Button>
|
||||
<Button
|
||||
android:id="@+id/qrzcombutton"
|
||||
android:id="@+id/qrzcom"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<item android:id="@+id/details" android:title="@string/app_sta" />
|
||||
<item android:id="@+id/message" android:title="@string/app_messages" />
|
||||
<item android:id="@+id/messagesclear" android:title="@string/app_messages_clear" />
|
||||
<item android:id="@+id/mapbutton" android:title="@string/sta_map" />
|
||||
<item android:id="@+id/aprsfibutton" android:title="@string/sta_aprsfi" />
|
||||
<item android:id="@+id/qrzcombutton" android:title="@string/sta_qrzcom" />
|
||||
<item android:id="@+id/map" android:title="@string/sta_map" />
|
||||
<item android:id="@+id/aprsfi" android:title="@string/sta_aprsfi" />
|
||||
<item android:id="@+id/qrzcom" android:title="@string/sta_qrzcom" />
|
||||
</menu>
|
||||
|
|
|
@ -32,7 +32,7 @@ class StationActivity extends StationHelper(R.string.app_sta)
|
|||
registerReceiver(locReceiver, new IntentFilter(AprsService.UPDATE))
|
||||
locReceiver.startTask(null)
|
||||
|
||||
Array(R.id.mapbutton, R.id.qrzcombutton, R.id.aprsfibutton).foreach((id) => {
|
||||
Array(R.id.map, R.id.qrzcom, R.id.aprsfi).foreach((id) => {
|
||||
findViewById(id).setOnClickListener(this)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -318,15 +318,15 @@ trait UIHelper extends Activity
|
|||
case R.id.messagesclear =>
|
||||
clearMessages(targetcall)
|
||||
true
|
||||
case R.id.mapbutton =>
|
||||
case R.id.map =>
|
||||
trackOnMap(targetcall)
|
||||
true
|
||||
case R.id.aprsfibutton =>
|
||||
case R.id.aprsfi =>
|
||||
val url = "http://aprs.fi/info/a/%s?utm_source=aprsdroid&utm_medium=inapp&utm_campaign=aprsfi".format(targetcall)
|
||||
startActivity(new Intent(Intent.ACTION_VIEW,
|
||||
Uri.parse(url)))
|
||||
true
|
||||
case R.id.qrzcombutton =>
|
||||
case R.id.qrzcom =>
|
||||
val url = "http://qrz.com/db/%s".format(targetcall.split("[- ]+")(0))
|
||||
startActivity(new Intent(Intent.ACTION_VIEW,
|
||||
Uri.parse(url)))
|
||||
|
|
Ładowanie…
Reference in New Issue