Added bug reporting link to departures page

This commit is contained in:
dkeen@dkeen-laptop 2012-02-19 17:46:11 -08:00
parent c0f00cd9f4
commit 2c763b3677
6 changed files with 102 additions and 35 deletions

View File

@ -2,6 +2,7 @@ syntax: glob
bin/* bin/*
.settings/org.eclipse.jdt.core.prefs .settings/org.eclipse.jdt.core.prefs
project.properties project.properties
dist/*
syntax: regexp syntax: regexp
^app_icon\.psd$ ^app_icon\.psd$
^bart-train\.jpg$ ^bart-train\.jpg$

View File

@ -1,27 +1,58 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"> android:layout_width="fill_parent"
<ImageView android:id="@+id/destinationColorBar" android:src="@drawable/basic_rectangle" android:layout_height="fill_parent" >
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_centerVertical="true" /> <ImageView
<LinearLayout android:id="@+id/topRow" android:id="@+id/destinationColorBar"
android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_width="wrap_content"
android:layout_toRightOf="@id/destinationColorBar" android:layout_height="wrap_content"
android:layout_alignParentTop="true"> android:layout_alignParentLeft="true"
<TextView android:id="@+id/destinationText" style="@style/DepartureDestinationText" android:layout_centerVertical="true"
android:layout_weight="1" android:singleLine="true" android:src="@drawable/basic_rectangle" />
android:ellipsize="marquee" />
<ImageView android:id="@+id/bikeIcon" android:src="@drawable/bike" <LinearLayout
style="@style/BikeIcon" /> android:id="@+id/topRow"
<TextView android:id="@+id/countdown" style="@style/DepartureCountdownText" android:layout_width="fill_parent"
android:gravity="right" /> android:layout_height="wrap_content"
</LinearLayout> android:layout_alignParentTop="true"
<ImageView android:id="@+id/xferIcon" android:src="@drawable/xfer" android:layout_toRightOf="@id/destinationColorBar" >
android:layout_below="@id/topRow" android:layout_alignParentRight="true"
style="@style/XferIcon" /> <TextView
<TextView android:id="@+id/trainLengthText" style="@style/DepartureTrainLengthText" android:id="@+id/destinationText"
android:layout_toRightOf="@id/destinationColorBar" style="@style/DepartureDestinationText"
android:layout_below="@id/topRow" /> android:layout_weight="1"
<TextView android:layout_alignParentRight="true" android:id="@+id/uncertainty" android:ellipsize="marquee"
android:layout_below="@id/topRow" style="@style/DepartureUncertaintyText" /> android:singleLine="true" />
<ImageView
android:id="@+id/bikeIcon"
style="@style/BikeIcon"
android:src="@drawable/bike" />
<TextView
android:id="@+id/countdown"
style="@style/DepartureCountdownText"
android:gravity="right" />
</LinearLayout>
<ImageView
android:id="@+id/xferIcon"
style="@style/XferIcon"
android:layout_alignParentRight="true"
android:layout_below="@id/topRow"
android:src="@drawable/xfer" />
<TextView
android:id="@+id/trainLengthText"
style="@style/DepartureTrainLengthText"
android:layout_below="@id/topRow"
android:layout_toRightOf="@id/destinationColorBar" />
<TextView
android:id="@+id/uncertainty"
style="@style/DepartureUncertaintyText"
android:layout_alignParentRight="true"
android:layout_below="@id/topRow" />
</RelativeLayout> </RelativeLayout>

View File

@ -1,14 +1,37 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent"
<TextView android:id="@+id/listTitle" android:layout_width="fill_parent" android:orientation="vertical" >
android:textSize="24dp" android:textStyle="bold"
android:layout_height="wrap_content" android:paddingLeft="5dp" <TextView
android:paddingRight="5dp" android:paddingBottom="10dp" /> android:id="@+id/listTitle"
<ListView android:layout_height="wrap_content" android:layout_width="fill_parent"
android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content"
android:id="@android:id/list" /> android:paddingBottom="10dp"
<TextView android:id="@android:id/empty" android:layout_width="fill_parent" android:paddingLeft="5dp"
android:layout_height="wrap_content" android:layout_weight="1" /> android:paddingRight="5dp"
android:textSize="24dp"
android:textStyle="bold" />
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/missingDepartureText"
style="@style/MissingDepartureText"
android:autoLink="email"
android:singleLine="false"
android:text="@string/missing_departure"
android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -20,6 +20,7 @@
http://m.bart.gov/schedules/advisories/</string> http://m.bart.gov/schedules/advisories/</string>
<string name="view">View</string> <string name="view">View</string>
<string name="view_departures">View departures</string> <string name="view_departures">View departures</string>
<string name="missing_departure">Missing departure? Inaccurate time? Please report to bartrunner@dougkeen.com</string>
<string name="delete">Delete</string> <string name="delete">Delete</string>
<string name="yes">Yes</string> <string name="yes">Yes</string>
<string name="cancel">Cancel</string> <string name="cancel">Cancel</string>

View File

@ -56,6 +56,13 @@
<item name="android:textSize">16dp</item> <item name="android:textSize">16dp</item>
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
</style> </style>
<style name="MissingDepartureText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">12dp</item>
<item name="android:singleLine">true</item>
<item name="android:gravity">center</item>
</style>
<style name="BikeIcon"> <style name="BikeIcon">
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>

View File

@ -7,6 +7,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.opengl.Visibility;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcelable; import android.os.Parcelable;
@ -17,6 +18,7 @@ import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -94,6 +96,8 @@ public class ViewDeparturesActivity extends ListActivity {
} }
} }
setListAdapter(mDeparturesAdapter); setListAdapter(mDeparturesAdapter);
findViewById(R.id.missingDepartureText).setVisibility(View.VISIBLE);
} }
@Override @Override