Add Performance Table

This commit is contained in:
jannis 2019-09-09 16:23:15 +02:00
parent b8a0012f7d
commit 719d889ae9
2 changed files with 73 additions and 0 deletions

View File

@ -29,6 +29,7 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.TableLayout;
import android.widget.TextView;
import androidx.core.content.FileProvider;
@ -45,6 +46,7 @@ import de.tadris.fitness.view.ProgressDialogController;
public class ShowWorkoutActivity extends WorkoutActivity {
TableLayout performanceTable;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -174,6 +176,19 @@ public class ShowWorkoutActivity extends WorkoutActivity {
root.addView(v);
}
void addPerformanceTable(){
performanceTable= new TableLayout(this);
addTitle("Performance"); // TODO: localization
root.addView(performanceTable);
refreshPerformanceTable();
}
void refreshPerformanceTable(){
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
~
~ This file is part of FitoTrack
~
~ FitoTrack is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ FitoTrack is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="500 m"
android:textSize="18sp" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="1:00"
android:textSize="18sp" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="15 km/h"
android:textSize="18sp" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="5"
android:text="3,6 min/km"
android:textSize="18sp" />
</TableRow>