Skip to content

Commit d3c46b7

Browse files
author
Kamil Svoboda
committed
Merge branch 'develop'
2 parents 1fb7d24 + 7df07b1 commit d3c46b7

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:versionCode="230"
4-
android:versionName="2.3.0"
3+
android:versionCode="231"
4+
android:versionName="2.3.1"
55
package="cz.tmapy.android.trex">
66
<!--Dangerous-->
77
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

app/src/main/java/cz/tmapy/android/trex/layout/TrackDataCursorAdapter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ public void bindView(View view, Context context, Cursor cursor) {
3636
tagView.setVisibility((tag != null && !tag.isEmpty()) ? View.VISIBLE : View.GONE);
3737

3838
TextView lengthView = (TextView) view.findViewById(R.id.text_tracks_list_item_length);
39-
Long d = (cursor.getLong(5) - cursor.getLong(1)) / 1000;
40-
lengthView.setText(String.format("%.2f", (cursor.getFloat(9) / 1000)) + " km");
39+
Long d = (cursor.getLong(6) - cursor.getLong(2)) / 1000;
40+
lengthView.setText(String.format("%.2f", (cursor.getFloat(10) / 1000)) + " km");
4141

4242
TextView durationView = (TextView) view.findViewById(R.id.text_tracks_list_item_duration);
4343
durationView.setText(String.format("%d:%02d:%02d", d / 3600, (d % 3600) / 60, (d % 60)));
4444

4545
TextView timeView = (TextView) view.findViewById(R.id.text_tracks_list_item_time);
46-
timeView.setText(new SimpleDateFormat("H:mm").format(cursor.getLong(1)));
46+
timeView.setText(new SimpleDateFormat("H:mm").format(cursor.getLong(2)));
4747

4848
TextView dateView = (TextView) view.findViewById(R.id.text_tracks_list_item_date);
49-
dateView.setText(new SimpleDateFormat("d.M.").format(cursor.getLong(1)));
49+
dateView.setText(new SimpleDateFormat("d.M.").format(cursor.getLong(2)));
5050

5151
TextView speedView = (TextView) view.findViewById(R.id.text_tracks_list_item_speed);
52-
speedView.setText(String.format("%.0f", (cursor.getFloat(10) / 1000) * 3600) + "/" + String.format("%.0f", (cursor.getFloat(11) / 1000) * 3600) + " km/h");
52+
speedView.setText(String.format("%.0f", (cursor.getFloat(11) / 1000) * 3600) + "/" + String.format("%.0f", (cursor.getFloat(12) / 1000) * 3600) + " km/h");
5353

5454
TextView elevView = (TextView) view.findViewById(R.id.text_tracks_list_item_elevation);
55-
elevView.setText(String.format("%.0f", cursor.getDouble(12)) + "/" + String.format("%.0f", cursor.getDouble(13)) + " m");
55+
elevView.setText(String.format("%.0f", cursor.getDouble(13)) + "/" + String.format("%.0f", cursor.getDouble(14)) + " m");
5656

5757
TextView addView = (TextView) view.findViewById(R.id.text_tracks_list_item_address);
58-
addView.setText((cursor.getString(4) != null ? cursor.getString(4) + " - " : "") + (cursor.getString(8) != null ? cursor.getString(8) : ""));
58+
addView.setText((cursor.getString(5) != null ? cursor.getString(5) + " - " : "") + (cursor.getString(9) != null ? cursor.getString(9) : ""));
5959
}
6060

6161
@Override

0 commit comments

Comments
 (0)