From 7bdcce501cc84be6ff6116b89589ee92fae183ed Mon Sep 17 00:00:00 2001 From: Jeremy Jao Date: Wed, 24 May 2017 19:24:55 -0400 Subject: [PATCH] add a 3 dot menu `No buses?` for future reference --- .../com/pittsburghrealtimetracker/SelectTransit.java | 10 ++++++++++ app/src/main/res/menu/select_transit.xml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/SelectTransit.java b/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/SelectTransit.java index 5bce1fbe..08586472 100644 --- a/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/SelectTransit.java +++ b/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/SelectTransit.java @@ -460,4 +460,14 @@ public void onClickDetourInfo(MenuItem item) { public void onClickAppDetails(MenuItem item) { openPermissionsPage(); } + + private void openNoBusesWebpage() { + Uri url = Uri.parse("https://github.com/rectangle-dbmi/Realtime-Port-Authority/wiki/Port-Authority-Server-Downtimes"); + Intent internetBrowser = new Intent(Intent.ACTION_VIEW, url); + startActivity(internetBrowser); + } + + public void onClickNoBuses(MenuItem item) { + openNoBusesWebpage(); + } } diff --git a/app/src/main/res/menu/select_transit.xml b/app/src/main/res/menu/select_transit.xml index 77dc7211..5b0f929b 100644 --- a/app/src/main/res/menu/select_transit.xml +++ b/app/src/main/res/menu/select_transit.xml @@ -23,5 +23,10 @@ android:title="@string/action_about" android:orderInCategory="400" appcompat:showAsAction="never" /> +