aboutsummaryrefslogtreecommitdiff
path: root/src/net/cbaines/suma/BusSpecificStopView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/cbaines/suma/BusSpecificStopView.java')
-rw-r--r--src/net/cbaines/suma/BusSpecificStopView.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/net/cbaines/suma/BusSpecificStopView.java b/src/net/cbaines/suma/BusSpecificStopView.java
index 88a403c..cad7524 100644
--- a/src/net/cbaines/suma/BusSpecificStopView.java
+++ b/src/net/cbaines/suma/BusSpecificStopView.java
@@ -25,7 +25,7 @@ import java.text.DateFormat;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
-import android.os.Handler;
+import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.View.OnClickListener;
@@ -39,11 +39,7 @@ import com.j256.ormlite.dao.Dao;
public class BusSpecificStopView extends LinearLayout implements OnClickListener, OnLongClickListener {
- // private static final String TAG = "BusSpecificStopView";
-
- private Handler handler;
-
- private Runnable refreshData;
+ private static final String TAG = "BusSpecificStopView";
// private static final String TAG = "StopView";
@@ -54,7 +50,7 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener
private Stop stop;
- public BusSpecificStopView(Context context, Stop newStop) {
+ public BusSpecificStopView(Context context, Stop stop) {
super(context);
this.context = context;
@@ -73,7 +69,6 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener
addView(location, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
addView(time, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
- handler.post(refreshData);
}
public void setStop(Stop stop) {
@@ -82,6 +77,16 @@ public class BusSpecificStopView extends LinearLayout implements OnClickListener
this.stop = stop;
+ if (stop == null) {
+ Log.e(TAG, "stop == null");
+ }
+ if (stop.busStop == null) {
+ Log.e(TAG, "stop.busStop == null");
+ }
+ if (stop.busStop.description == null) {
+ Log.e(TAG, "stop.busStop.description == null");
+ }
+
if (stop.busStop.description.length() > 20) {
location.setText(stop.busStop.description.substring(0, 20)); // TODO
} else {