Skip to content

Commit

Permalink
fix for newer buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
senpl committed Nov 3, 2020
1 parent 99acf8f commit 193bd7a
Show file tree
Hide file tree
Showing 35 changed files with 30 additions and 12 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/com/fitworkoutfast/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ class MainActivity : AppCompatActivity() {
val mDbCardio = DAOCardio(this)
val mList = mDbOldCardio.allRecords
for (record in mList) {
var exerciseName = ""
val m = lDAOMachine.getMachine(record.exercice)
exerciseName = record.exercice
var exerciseName = record.exercice
if (m != null) { // if a machine exists
if (m.type == DAOMachine.TYPE_FONTE) { // if it is not a Cardio type
exerciseName = "$exerciseName-Cardio" // add a suffix to
Expand Down Expand Up @@ -741,7 +740,7 @@ class MainActivity : AppCompatActivity() {
return mpWeightFrag
}
private val programsFragment: ProgramsPagerFragment
private get() {
get() {
if (mpProgramPagerFrag == null) mpProgramPagerFrag = supportFragmentManager.findFragmentByTag(PROGRAMS) as ProgramsPagerFragment?
if (mpProgramPagerFrag == null) mpProgramPagerFrag = newInstance(PROGRAMS, Integer.valueOf(11))
return mpProgramPagerFrag!!
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Diff not rendered.
15 changes: 8 additions & 7 deletions app/src/main/res/layout/tab_program_runner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
android:inputType="none"
android:imeOptions="actionNext"
android:singleLine="true" />
<!-- android:inputType="text|textCapWords|textAutoComplete|textNoSuggestions|textVisiblePassword"-->

<ImageButton
android:id="@+id/exercisesListButton"
Expand Down Expand Up @@ -561,7 +560,7 @@
<ImageButton
android:id="@+id/previousExerciseArrow"
style="@style/AddImageButton"
android:src="@drawable/ic_previous"
android:src="@drawable/round_arrow_back_white_36dp"
android:layout_marginStart="8dp"
android:layout_width="64dp"
android:minHeight="68dp"
Expand All @@ -581,13 +580,14 @@
<ImageButton
android:id="@+id/failButton"
style="@style/AddImageButton"
android:backgroundTint="@color/redWarn"
android:layout_width="0dp"
android:minHeight="68dp"
android:layout_height="wrap_content"
android:layout_toStartOf="@+id/addButton"
android:layout_toEndOf="@+id/previousExerciseArrow"
android:contentDescription="@string/failedToDoReps"
android:src="@drawable/fail_clear_red_600_24dp"
android:src="@drawable/round_cancel_white_36dp"
android:text="@string/FailLabel"
android:clickable="true"
app:layout_constraintBottom_toBottomOf="parent"
Expand All @@ -598,13 +598,14 @@
<ImageButton
android:id="@+id/addButton"
style="@style/AddImageButton"
android:backgroundTint="@color/main_green_color"
android:layout_width="0dp"
android:minHeight="68dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toStartOf="@+id/nextExerciseArrow"
android:contentDescription="@string/DoneLabel"
android:src="@drawable/done_check_green_800_24dp"
android:src="@drawable/round_check_white_48dp"
android:text="@string/DoneLabel"
android:clickable="true"
app:layout_constraintBottom_toBottomOf="parent"
Expand All @@ -616,7 +617,7 @@
<ImageButton
android:id="@+id/nextExerciseArrow"
style="@style/AddImageButton"
android:src="@drawable/ic_next"
android:src="@drawable/round_arrow_forward_white_36dp"
android:layout_width="64dp"
android:minHeight="68dp"
android:layout_marginEnd="8dp"
Expand All @@ -642,7 +643,7 @@
app:fpl_progressDirection="top_to_bottom"
app:fpl_shouldRestart="false"
app:fpl_gradientDirection="bottom_to_top"
app:fpl_gradientColors="@color/cardview_shadow_end_color"
app:fpl_gradientColors="@array/gradientColorsBlue"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
Expand Down Expand Up @@ -675,7 +676,7 @@
app:fpl_progressDirection="top_to_bottom"
app:fpl_shouldRestart="false"
app:fpl_gradientDirection="bottom_to_top"
app:fpl_gradientColors="@color/cardview_shadow_end_color"
app:fpl_gradientColors="@array/gradientColors"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
Expand Down
11 changes: 10 additions & 1 deletion app/src/main/res/values-night/color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,14 @@
<color name="add_button_background">#7C7C7C</color>
<color name="dark_icon_background">#C0C0C0</color>
<color name="colorSecondary">#FFFFFF</color>
<color name="colorAccent">#FFFFFF</color>
<color name="colorAccent">#60bf04</color>
<color name="redWarn">#D50000</color>
<array name="gradientColors">
<item>#5E5E5E</item>
<item>#388E3C</item>
</array>
<array name="gradientColorsBlue">
<item>#3c40c6</item>
<item>#5E5E5E</item>
</array>
</resources>
9 changes: 9 additions & 0 deletions app/src/main/res/values/color.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,13 @@
<color name="colorPrimary">@color/text_color</color>
<color name="colorSecondary">#FFFFFF</color>
<color name="colorAccent">#FFFFFF</color>
<color name="redWarn">#D50000</color>
<array name="gradientColors">
<item>#5E5E5E</item>
<item>#388E3C</item>
</array>
<array name="gradientColorsBlue">
<item>#3c40c6</item>
<item>#5E5E5E</item>
</array>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,5 +376,5 @@
<string name="saved_into_program">Saved into program</string>
<string name="SaveRepsLabel">Save reps into program</string>
<string name="add_exercise_to_program_first">Add exercise to program first. No program without exercises allowed.</string>
<string name="emptyExercisesInProgram"><![CDATA[Go to Program -> Exercise in program and add exercise to program first]]></string>
<string name="emptyExercisesInProgram"><![CDATA[Go to Side Menu(Toggle button), press "Program" -> add exercise to program first]]></string>
</resources>

0 comments on commit 193bd7a

Please sign in to comment.