|| currLon < lonFrom || currLon > lonTo)\r
&& (prevLat < latFrom || prevLat > latTo\r
|| prevLon < lonFrom || prevLon > lonTo)) {\r
- // TODO: 両端ã\81¨ã\82\82ç\94»é\9d¢å¤\96ã\81 ã\81\8cç\94»é\9d¢å\86\85ã\82\92é\80\9aã\82\8bå ´å\90\88ã\82\92è\80\83æ\85®\r
+ // TODO: 両端ã\81¨ã\82\82ç\94»é\9d¢å¤\96ã\81 ã\81\8cç·\9aã\81\8cç\94»é\9d¢å\86\85ã\82\92é\80\9aã\82\8bå ´å\90\88ã\81\8cè\80\83æ\85®ã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84\r
pxStart = null;\r
// 上記以外の場合は経路を描画\r
} else {\r
"yyyy/MM/dd hh:mm:ss");
/** The m_start time map. */
- private HashMap<Integer, Long> m_startTimeMap = new HashMap<Integer, Long>();
+ private ArrayList<Long> m_startTimeList = new ArrayList<Long>();
/** The Constant MENU_DELETE_THIS. */
private static final int MENU_DELETE_THIS = Menu.FIRST + 200;
// I need "select distinct"!
continue;
}
- m_startTimeMap.put(history.size(), startTime);
+ m_startTimeList.add(startTime);
String[] hist = new String[3];
prevStartTime = startTime;
public void onItemClick(AdapterView<?> parent, View view, int position,
long id) {
Intent returnData = new Intent();
- long startTime = m_startTimeMap.get(position);
+ long startTime = m_startTimeList.get(position);
returnData.setAction(Intent.ACTION_VIEW);
returnData.putExtra("startTime", startTime);
long startTime = 0;
switch (item.getItemId()) {
case MENU_DELETE_THIS:
- startTime = m_startTimeMap.get(position);
+ startTime = m_startTimeList.get(position);
String selection = RunningRecordProvider.START_TIME + " = ?";
String[] selectionArgs = { Long.toString(startTime) };
selection, selectionArgs);
historyArray.remove(historyArray.getItem(position));
+ m_startTimeList.remove(position);
break;
case MENU_DELETE_ALL:
getContentResolver().delete(RunningRecordProvider.REC_URI, null,
historyArray.clear();
break;
case MENU_SAVE_GPX:
- startTime = m_startTimeMap.get(position);
+ startTime = m_startTimeList.get(position);
saveRecordAsGpxFile(startTime);
break;
default:
return;
}
+ String pointName = "";
// 音声出力でスタートを知らせる
Location prevLocation = m_runningRecord.getPrevLocation();
if (prevLocation == null) {
AudioManager.STREAM_SYSTEM, ToneGenerator.MAX_VOLUME);
toneGenerator.startTone(ToneGenerator.TONE_PROP_BEEP);
toneGenerator.stopTone();
+ pointName = getString(R.string.point_start);
}
// 精度が低いデータは無視
}
- String pointName = m_runningRecord.addRecord(location.getTime(),
- location, "");
+ pointName = m_runningRecord.addRecord(location.getTime(),
+ location, pointName);
// ラップタイム履歴
if (pointName.length() > 0) {
long currentTime = System.currentTimeMillis();
Location startPoint = null;
+ String pointName = "";
if (m_useGPS) {
startPoint = m_locMgr
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
startPoint = null;
} else {
currentTime = startPoint.getTime();
+ pointName = getString(R.string.point_start);
}
}
- m_runningRecord.addRecord(currentTime, startPoint,
- getString(R.string.point_start));
+ m_runningRecord.addRecord(currentTime, startPoint, pointName);
m_running = true;
Button startStopButton = (Button) findViewById(R.id.button_start_stop);