Fix marker display when the gps location time is 0.

If gps is not available, the waypoint marker time is 0.
So do not display the time if it is not available.
This commit is contained in:
Jimmy Shih
2011-12-14 14:53:20 -08:00
parent 58868dcd4f
commit 8103bf58d8
@@ -265,9 +265,13 @@ public class WaypointsList extends ListActivity
if (columnIndex == timeIdx) {
long time = cursor.getLong(timeIdx);
TextView textView = (TextView) view;
textView.setText(String.format("%tc", time));
textView.setVisibility(
textView.getText().length() < 1 ? View.GONE : View.VISIBLE);
if (time == 0) {
textView.setVisibility(View.GONE);
} else {
textView.setText(String.format("%tc", time));
textView.setVisibility(View.VISIBLE);
}
} else if (columnIndex == typeIdx) {
int type = cursor.getInt(typeIdx);
ImageView imageView = (ImageView) view;