From bf1a2e2debd6de3202fa68ec3bf8bc7af16d19e2 Mon Sep 17 00:00:00 2001 From: Christopher Beckmann Date: Tue, 15 Oct 2019 14:40:24 +0200 Subject: [PATCH] Fixed overlapping Exercise names. Changed app name and german translation. Added default sets to database. --- app/build.gradle | 4 +- app/src/main/AndroidManifest.xml | 2 +- .../main/assets/databases/exercises.sqlite | Bin 240640 -> 240640 bytes .../aktivpause/activities/AboutActivity.java | 9 ++- .../tutorial/FirstLaunchManager.java | 57 ------------------ .../aktivpause/database/SQLiteHelper.java | 3 +- app/src/main/res/layout/dialog_exercise.xml | 29 ++++----- app/src/main/res/layout/nav_header.xml | 2 +- app/src/main/res/menu/nav_drawer.xml | 2 +- app/src/main/res/values-de/strings.xml | 10 +-- app/src/main/res/values/strings.xml | 14 ++--- build.gradle | 2 +- 12 files changed, 40 insertions(+), 94 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 180178a..36c90ad 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "org.secuso.aktivpause" minSdkVersion 21 targetSdkVersion 28 - versionCode 4 - versionName "0.4" + versionCode 5 + versionName "0.5" vectorDrawables.useSupportLibrary = true } lintOptions { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2754b12..5548c61 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -45,7 +45,7 @@ )=u{3fYhbGSmWs zX%HfxlMi)I-~loysshF`lT1QRgn%JQ%n_s<#>Ehpr7VN6h?3tRG6l(J5H^s!2H_|0 zTV%mfz&M4hQno=9Nm8ak6j-DTPLQx7xeUTBO6dk63({bkLD>NAN0P^&16Ijy5FklT zgK!ZLZH$r$fo(`~8%)0i*g-@{au{d3EJ}imu_TFvV?x+%38KR3up-JF%d%+Y*lJ}m zQDkHh7Dds*c@~Q(a4ZNSaLjHQ3$iRbm?{#GF4=bh4%1=R)%a6A;GRi@sxtBc?MSN_ ztSWQ5EJ#iF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p@AbOd`15KTB{_tq bK?cbYr 0) { - List setList = new ArrayList<>(); - - while(setCursor.moveToNext()) { - setList.add(setCursor.getInt(setCursor.getColumnIndex(ExerciseSetColumns._ID))); - } - - setCursor.close(); - - for(Integer id : setList) { - dbHandler.clearExercisesFromSet(id); - dbHandler.deleteExerciseSet(id); - } - } - - long id5 = dbHandler.addDefaultExerciseSet(context.getString(R.string.set_default_5)); - long id4 = dbHandler.addDefaultExerciseSet(context.getString(R.string.set_default_4)); - long id3 = dbHandler.addDefaultExerciseSet(context.getString(R.string.set_default_3)); - long id2 = dbHandler.addDefaultExerciseSet(context.getString(R.string.set_default_2)); - long id1 = dbHandler.addDefaultExerciseSet(context.getString(R.string.set_default_1)); - - dbHandler.addExerciseToExerciseSet((int) id1, 1); - dbHandler.addExerciseToExerciseSet((int) id1, 2); - dbHandler.addExerciseToExerciseSet((int) id1, 3); - dbHandler.addExerciseToExerciseSet((int) id1, 4); - dbHandler.addExerciseToExerciseSet((int) id1, 5); - - dbHandler.addExerciseToExerciseSet((int) id2, 6); - dbHandler.addExerciseToExerciseSet((int) id2, 7); - dbHandler.addExerciseToExerciseSet((int) id2, 11); - dbHandler.addExerciseToExerciseSet((int) id2, 13); - dbHandler.addExerciseToExerciseSet((int) id2, 17); - - dbHandler.addExerciseToExerciseSet((int) id3, 16); - dbHandler.addExerciseToExerciseSet((int) id3, 20); - dbHandler.addExerciseToExerciseSet((int) id3, 25); - dbHandler.addExerciseToExerciseSet((int) id3, 26); - dbHandler.addExerciseToExerciseSet((int) id3, 34); - - dbHandler.addExerciseToExerciseSet((int) id4, 27); - dbHandler.addExerciseToExerciseSet((int) id4, 31); - dbHandler.addExerciseToExerciseSet((int) id4, 33); - dbHandler.addExerciseToExerciseSet((int) id4, 35); - dbHandler.addExerciseToExerciseSet((int) id4, 36); - - dbHandler.addExerciseToExerciseSet((int) id5, 27); - dbHandler.addExerciseToExerciseSet((int) id5, 28); - dbHandler.addExerciseToExerciseSet((int) id5, 29); - dbHandler.addExerciseToExerciseSet((int) id5, 36); - dbHandler.addExerciseToExerciseSet((int) id5, 39); - } - } diff --git a/app/src/main/java/org/secuso/aktivpause/database/SQLiteHelper.java b/app/src/main/java/org/secuso/aktivpause/database/SQLiteHelper.java index 1b3c698..d5e45e6 100644 --- a/app/src/main/java/org/secuso/aktivpause/database/SQLiteHelper.java +++ b/app/src/main/java/org/secuso/aktivpause/database/SQLiteHelper.java @@ -150,7 +150,7 @@ public synchronized Cursor getExerciseCursorForSet(int setId, String language) { "LEFT OUTER JOIN "+ExerciseLocalColumns.TABLE_NAME+" L\n" + "\tON E."+ExerciseColumns._ID+" = L."+ExerciseLocalColumns.EXERCISE_ID+"\n" + "WHERE ES."+ExerciseSetColumns._ID+" = ? AND L."+ExerciseLocalColumns.LANGUAGE+" = ?\n" + - "ORDER BY ESE."+ExerciseColumns._ID+" ASC"; + "ORDER BY ESE.exercise_order ASC"; return database.rawQuery(sql, new String[]{String.valueOf(setId), language}); } @@ -296,7 +296,6 @@ private String buildQuery(int sectionCheck) { } } - sqlQuery.append("ORDER BY E."); sqlQuery.append(ExerciseColumns._ID); sqlQuery.append(" ASC"); diff --git a/app/src/main/res/layout/dialog_exercise.xml b/app/src/main/res/layout/dialog_exercise.xml index 84b1531..747b5dd 100644 --- a/app/src/main/res/layout/dialog_exercise.xml +++ b/app/src/main/res/layout/dialog_exercise.xml @@ -11,11 +11,9 @@ android:id="@+id/exercise_image" android:layout_width="180dp" android:layout_height="180dp" - android:layout_marginEnd="8dp" android:layout_marginLeft="8dp" + android:layout_marginTop="8dp" android:layout_marginRight="8dp" - android:layout_marginStart="8dp" - android:layout_marginTop="7dp" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" @@ -27,9 +25,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8dp" - android:layout_marginTop="0dp" android:text="@string/execution" android:textStyle="bold" + android:visibility="invisible" app:layout_constraintLeft_toRightOf="parent" app:layout_constraintTop_toTopOf="@+id/section_card" /> @@ -37,14 +35,18 @@ android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="8dp" android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:text="Name of exercise" android:textSize="16sp" android:textStyle="bold" - android:text="Name of exercise" - app:layout_constraintTop_toTopOf="parent" + android:visibility="visible" + app:layout_constrainedWidth="true" + app:layout_constraintEnd_toStartOf="@+id/section_card" + app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - android:visibility="visible"/> + app:layout_constraintTop_toTopOf="parent" + tools:text="Name of a very long exercise that can maybe wrap around" /> + app:layout_constraintTop_toBottomOf="@+id/execution_title" /> + app:layout_constraintTop_toTopOf="@+id/name"> diff --git a/app/src/main/res/layout/nav_header.xml b/app/src/main/res/layout/nav_header.xml index e7efb16..b6b2296 100644 --- a/app/src/main/res/layout/nav_header.xml +++ b/app/src/main/res/layout/nav_header.xml @@ -28,7 +28,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingLeft="@dimen/activity_horizontal_margin" - android:text="@string/app_name" + android:text="@string/app_name_short" android:textColor="@color/colorPrimary" android:textSize="18sp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" diff --git a/app/src/main/res/menu/nav_drawer.xml b/app/src/main/res/menu/nav_drawer.xml index 7f90ced..57ce8df 100644 --- a/app/src/main/res/menu/nav_drawer.xml +++ b/app/src/main/res/menu/nav_drawer.xml @@ -5,7 +5,7 @@ + android:title="@string/app_name_short" /> - Aktivepause + Aktivpause to Go + Aktivpause Willkommen - Willkommen bei der Privacy Friendly Aktive Pause App. Diese App erinnert Sie daran, regelmäßig während der Arbeit Pausen einzulegen. Zusätzlich können Sie sich Übungen aussuchen, mit denen Sie Ihre Pause aktiv gestalten können. + Willkommen bei der Privacy Friendly Aktivpause to Go App. Diese App erinnert Sie daran, regelmäßig während der Arbeit Pausen einzulegen. Zusätzlich können Sie sich Übungen aussuchen, mit denen Sie Ihre Pause aktiv gestalten können. Übungsset erstellen @@ -44,11 +45,10 @@ Schulter Rücken Gesicht - Körper + Ganzkörper Sonstiges Bitte geben Sie einen Namen an. - @string/app_name Neues Übungsset hinzufügen Einstellungen Geben Sie einen Namen ein… @@ -93,7 +93,7 @@ Über Autoren: - Grafiken und Bilder: + Grafiken und Beschreibungen: %s und Mitwirkende In Zusammenarbeit mit Mehr Information finden Sie hier: diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bf54e9c..aabe511 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,10 +1,11 @@ - Aktivpause + Aktivpause to Go + Aktivpause Open navigation drawer Close navigation drawer - Welcome to Privacy Friendly Pausing Healthily! + Welcome to Aktivpause to Go! This app reminds you to regularly take breaks during your work. Additionally, you can choose from a set of exercises, that can help you to spend your break more active. Create Exercise Sets @@ -62,7 +63,6 @@ Exercise Sets Edit Exercise Set Add New Exercise Set - Pausing Healthily Exercise Set Name Are you sure you want to discard the changes? Tutorial @@ -85,14 +85,14 @@ About - Privacy Friendly Pausing Healthily + Privacy Friendly Aktivpause to Go Version Authors: Christopher Beckmann, Eduardo Fontao %s and contributors. In affiliation with More Information can be found on: - Github-Repo + Github-Repo SECUSO-Website This application belongs to the group of Privacy Friendly Apps developed by the Karlsruhe Institute of Technology (KIT). Sourcecode licensed under GPLv3. Images copyright KIT and Google Inc. @@ -135,8 +135,8 @@ No keep editing discard - Graphics & images: - Tatjana Albrandt + Graphics & Descriptions: + KIT Sport Club 2010 e.V. diff --git a/build.gradle b/build.gradle index 4efb2aa..3cd0732 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.0' + classpath 'com.android.tools.build:gradle:3.5.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files