From 8a643bd447606192396e31ae33e6d4723ade2fd3 Mon Sep 17 00:00:00 2001 From: Kuba Date: Mon, 6 Jan 2014 22:49:34 +0100 Subject: [PATCH 01/12] =?UTF-8?q?chyba=20juz=20si=C4=99=20nie=20wywala=20t?= =?UTF-8?q?am=20gdzie=20wcze=C5=9Bniej=20+=20po=20mojej=20ostatniej=20zmia?= =?UTF-8?q?nie=20nie=20by=C5=82o=20wida=C4=87=20czasu=20rozgrzewki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ZPI1/src/com/pwr/zpi/ActivityActivity.java | 4 +++- ZPI1/src/com/pwr/zpi/adapters/DrawerWorkoutsRowBuilder.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ZPI1/src/com/pwr/zpi/ActivityActivity.java b/ZPI1/src/com/pwr/zpi/ActivityActivity.java index b7a6255..b2ee623 100644 --- a/ZPI1/src/com/pwr/zpi/ActivityActivity.java +++ b/ZPI1/src/com/pwr/zpi/ActivityActivity.java @@ -536,7 +536,9 @@ private void pauseRun() { @Override public void run() { if (!isPaused) { - actualPaceCalculator.reset(); + if (actualPaceCalculator != null) { + actualPaceCalculator.reset(); + } isPaused = true; startStopLayout.setVisibility(View.INVISIBLE); resumeButton.setVisibility(View.VISIBLE); diff --git a/ZPI1/src/com/pwr/zpi/adapters/DrawerWorkoutsRowBuilder.java b/ZPI1/src/com/pwr/zpi/adapters/DrawerWorkoutsRowBuilder.java index fed730b..a9614bc 100644 --- a/ZPI1/src/com/pwr/zpi/adapters/DrawerWorkoutsRowBuilder.java +++ b/ZPI1/src/com/pwr/zpi/adapters/DrawerWorkoutsRowBuilder.java @@ -113,7 +113,9 @@ else if (position == workout.getCurrentAction()) { } else { rowHolder.actionTextAdvanced.setText(workout.getHowMuchLeftCurrentActionStringWithUnits()); - rowHolder.actionTextAdvanced.setBackgroundColor(context.getResources().getColor(textColor)); + if (action.isAdvanced()) { + rowHolder.actionTextAdvanced.setBackgroundColor(context.getResources().getColor(textColor)); + } } } else { From c5529e72c31ea703c683e3d28684dc3bb82682fe Mon Sep 17 00:00:00 2001 From: Kuba Date: Wed, 15 Jan 2014 17:00:43 +0100 Subject: [PATCH 02/12] Button to generate repeats --- ZPI1/res/layout/generate_repeats_dialog.xml | 116 ++++++++++++++++++ ZPI1/res/layout/new_workout_footer.xml | 13 +- ZPI1/res/layout/picker_control_horizontal.xml | 18 ++- .../workout_action_advanced_list_item.xml | 10 ++ .../workouts_action_simple_list_item.xml | 13 +- ZPI1/res/values-pl/strings.xml | 8 ++ ZPI1/res/values/strings.xml | 8 ++ ZPI1/src/com/pwr/zpi/NewWorkoutActivity.java | 12 ++ .../adapters/WorkoutActionsRowBuilder.java | 5 +- ZPI1/src/com/pwr/zpi/database/Database.java | 23 ++-- .../com/pwr/zpi/dialogs/DialogFactory.java | 64 ++++++++++ ZPI1/src/com/pwr/zpi/views/CustomPicker.java | 5 + 12 files changed, 272 insertions(+), 23 deletions(-) create mode 100644 ZPI1/res/layout/generate_repeats_dialog.xml diff --git a/ZPI1/res/layout/generate_repeats_dialog.xml b/ZPI1/res/layout/generate_repeats_dialog.xml new file mode 100644 index 0000000..fac4dc0 --- /dev/null +++ b/ZPI1/res/layout/generate_repeats_dialog.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +