Major changes
Added german language, some additions to Help layout, fixed a bug in DBHandler, changed BreakActivity and layout for it, cleaned code in BreakReminder, fixed bug in ExerciseListPreference, cleaned code in ProfileActivity,
This commit is contained in:
parent
f8e4952faa
commit
ab852b40f8
16 changed files with 747 additions and 632 deletions
|
|
@ -14,6 +14,7 @@ import android.support.v4.app.NotificationCompat;
|
|||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
|
@ -28,14 +29,14 @@ public class BreakActivity extends AppCompatActivity implements View.OnClickList
|
|||
private boolean isRunning = false;
|
||||
private List<Exercise> exerciseList;
|
||||
private SharedPreferences sharedPrefs;
|
||||
private TextView description, side_repetition, break_exercise_type;
|
||||
private TextView description, side_repetition, break_exercise_type, execution;
|
||||
private int currentExercise, breakTime = 0;
|
||||
private ImageView image, image_mid, image_right;
|
||||
private ImageView image;
|
||||
private String[] exercises;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_break);
|
||||
|
||||
currentExercise = 0;
|
||||
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
|
|
@ -46,56 +47,61 @@ public class BreakActivity extends AppCompatActivity implements View.OnClickList
|
|||
bufferZeroMinute = "0";
|
||||
|
||||
ct_text = (TextView) findViewById(R.id.textViewBreak);
|
||||
ct_text.setText(bufferZeroMinute + mins + ":00");
|
||||
|
||||
Button skipButton = (Button) findViewById(R.id.button_next);
|
||||
skipButton.setOnClickListener(this);
|
||||
ct_text.setOnClickListener(this);
|
||||
|
||||
|
||||
// LinearLayout ll = (LinearLayout) findViewById(R.id.layout_break);
|
||||
// // TODO Do it dynamically
|
||||
// for (int i = 0; i < 20; i++) {
|
||||
// ImageView image = new ImageView(this);
|
||||
// image.setLayoutParams(new android.view.ViewGroup.LayoutParams(80, 60));
|
||||
// image.setImageResource(R.drawable.statistic_logo);
|
||||
// ll.addView(image);
|
||||
// }
|
||||
|
||||
DBHandler dbHandler = new DBHandler(this);
|
||||
String[] allProfiles = sharedPrefs.getString("profiles", "").split(";");
|
||||
String currentProfile = sharedPrefs.getString("name_text", "");
|
||||
String[] exercises = new String[8];
|
||||
|
||||
for (int i = 0; i < allProfiles.length; i++) {
|
||||
if (allProfiles[i].split(",")[0].equals(currentProfile)) {
|
||||
System.out.println("Hi: " + allProfiles[i].split(",")[4]);
|
||||
if (allProfiles[i].split(",")[0].equals(currentProfile) && !allProfiles[i].split(",")[4].equals("-1")) {
|
||||
exercises = allProfiles[i].split(",")[4].split("\\.");
|
||||
}
|
||||
}
|
||||
exerciseList = dbHandler.getExercisesFromSection(exercises[currentExercise]);
|
||||
description = (TextView) findViewById(R.id.textViewDescription);
|
||||
description.setText(exerciseList.get(currentExercise).getDescription());
|
||||
|
||||
side_repetition = (TextView) findViewById(R.id.textSideRepetition);
|
||||
side_repetition.setText("Break");
|
||||
if (exercises == null) {
|
||||
setContentView(R.layout.activity_break_no_exercises);
|
||||
Button cancelButton = (Button) findViewById(R.id.button_cancel);
|
||||
cancelButton.setOnClickListener(this);
|
||||
ct_text = (TextView) findViewById(R.id.textViewBreak1);
|
||||
|
||||
break_exercise_type = (TextView) findViewById(R.id.break_exercise_type);
|
||||
break_exercise_type.setText(exerciseList.get(currentExercise).getSection());
|
||||
ct_text.setText(bufferZeroMinute + mins + ":00");
|
||||
ct_text.setOnClickListener(this);
|
||||
} else {
|
||||
setContentView(R.layout.activity_break);
|
||||
Button nextButton = (Button) findViewById(R.id.button_next);
|
||||
nextButton.setOnClickListener(this);
|
||||
ct_text = (TextView) findViewById(R.id.textViewBreak);
|
||||
ct_text.setText(bufferZeroMinute + mins + ":00");
|
||||
ct_text.setOnClickListener(this);
|
||||
|
||||
image = (ImageView) findViewById(R.id.imageView);
|
||||
image_mid = (ImageView) findViewById(R.id.imageMid);
|
||||
image_right = (ImageView) findViewById(R.id.imageRight);
|
||||
image.setImageResource(R.drawable.train_left);
|
||||
image_right.setImageResource(R.drawable.train_right);
|
||||
|
||||
//TODO Iterate over all
|
||||
exerciseList = dbHandler.getExercisesFromSection(exercises[currentExercise]);
|
||||
description = (TextView) findViewById(R.id.textViewDescription);
|
||||
description.setText(exerciseList.get(currentExercise).getDescription());
|
||||
|
||||
execution = (TextView) findViewById(R.id.textViewExecution);
|
||||
execution.setText(exerciseList.get(currentExercise).getExecution());
|
||||
|
||||
side_repetition = (TextView) findViewById(R.id.textSideRepetition);
|
||||
side_repetition.setText(R.string.exercise_break);
|
||||
|
||||
break_exercise_type = (TextView) findViewById(R.id.break_exercise_type);
|
||||
break_exercise_type.setText(exerciseList.get(currentExercise).getSection());
|
||||
|
||||
image = (ImageView) findViewById(R.id.imageMid);
|
||||
image.setImageResource(R.drawable.train_left);
|
||||
}
|
||||
|
||||
//Keep screen on while on break
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
}
|
||||
|
||||
public void onClick(View v) {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
int mins = sharedPrefs.getInt("break_value", 10);
|
||||
String bufferZeroMinute = "";
|
||||
String bufferZeroSecond = "";
|
||||
int time = mins * 60 * 1000;
|
||||
int oldTime = time;
|
||||
|
||||
if (stopTime == "" && !isRunning) {
|
||||
if (time / 1000 / 60 < 10)
|
||||
|
|
@ -126,148 +132,172 @@ public class BreakActivity extends AppCompatActivity implements View.OnClickList
|
|||
|
||||
switch (v.getId()) {
|
||||
|
||||
case R.id.textViewBreak1:
|
||||
case R.id.textViewBreak:
|
||||
if (isRunning) {
|
||||
ct.cancel();
|
||||
stopTime = (String) ct_text.getText();
|
||||
isRunning = false;
|
||||
} else {
|
||||
ct = new CountDownTimer(time, 1000) {
|
||||
boolean timeLeft = false;
|
||||
|
||||
public void onTick(long millisUntilFinished) {
|
||||
String bufferZeroMinute = "";
|
||||
String bufferZeroSecond = "";
|
||||
|
||||
if ((millisUntilFinished / 1000) / 60 < 10)
|
||||
bufferZeroMinute = "0";
|
||||
|
||||
if (millisUntilFinished / 1000 % 60 < 10)
|
||||
bufferZeroSecond = "0";
|
||||
|
||||
ct_text.setText(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
//FIXME 10 Sec break -> 10 + 10 exercise -> 10 sec break
|
||||
update();
|
||||
|
||||
//Show how much time is left
|
||||
timeLeft = sharedPrefs.getBoolean("notifications_new_message_timeLeft", false);
|
||||
if (timeLeft) {
|
||||
Notification notification = new NotificationCompat.Builder(getApplicationContext()).setCategory(Notification.CATEGORY_MESSAGE)
|
||||
.setSmallIcon(R.drawable.ic_notifications_black_24dp)
|
||||
.setContentTitle("Break Activity Reminder: ")
|
||||
.setContentText(((millisUntilFinished / 1000) / 60) + "Minutes and " + (millisUntilFinished / 1000 % 60) + " seconds")
|
||||
.setAutoCancel(true)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC).build();
|
||||
NotificationManager notificationManager =
|
||||
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.notify(999, notification);
|
||||
}
|
||||
}
|
||||
|
||||
public void onFinish() {
|
||||
isRunning = false;
|
||||
ct_text.setText("00:00");
|
||||
//Trigger the alarm
|
||||
String ringPref = sharedPrefs.getString("notifications_new_message_ringtone", "");
|
||||
System.out.println("Sound: " + ringPref);
|
||||
if (!ringPref.equals("")) {
|
||||
System.out.println("-----------------PLAY NOTIFICATION SOUND----------------");
|
||||
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), Uri.parse(ringPref));
|
||||
r.play();
|
||||
}
|
||||
|
||||
//FIXME Test Vibration
|
||||
boolean vibrateChecked = sharedPrefs.getBoolean("notifications_new_message_vibrate", false);
|
||||
System.out.println("Vibrate is : " + vibrateChecked);
|
||||
if (vibrateChecked) {
|
||||
// Get instance of Vibrator from current Context
|
||||
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
if (v == null) {
|
||||
System.out.println("No vibrator! :D");
|
||||
} else {
|
||||
// Vibrate for 3000 milliseconds
|
||||
System.out.println("Vibrate for 3000 ms");
|
||||
v.vibrate(3000);
|
||||
}
|
||||
}
|
||||
|
||||
//Cancel the notification
|
||||
if (timeLeft) {
|
||||
NotificationManager notificationManager =
|
||||
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.cancel(999);
|
||||
}
|
||||
finish();
|
||||
//startBreak();
|
||||
}
|
||||
}.start();
|
||||
isRunning = true;
|
||||
startTimer(time);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case R.id.button_cancel:
|
||||
if (ct != null)
|
||||
ct.cancel();
|
||||
finish();
|
||||
break;
|
||||
|
||||
case R.id.button_next:
|
||||
//TODO Update Timer
|
||||
|
||||
// Next Exercise
|
||||
currentExercise++;
|
||||
System.out.println("Current Ex#: " + currentExercise + " , All Ex#: " + exerciseList.size());
|
||||
side_repetition.setText("Break");
|
||||
side_repetition.setText(R.string.exercise_break);
|
||||
if (currentExercise > exerciseList.size() - 1)
|
||||
currentExercise = 0;
|
||||
description.setText(exerciseList.get(currentExercise).getDescription());
|
||||
execution.setText(exerciseList.get(currentExercise).getExecution());
|
||||
|
||||
switch (currentExercise % 3) {
|
||||
case 0:
|
||||
image.setImageResource(R.drawable.train_left);
|
||||
image_mid.setImageResource(android.R.color.transparent);
|
||||
image_right.setImageResource(R.drawable.train_right);
|
||||
break;
|
||||
//Update Timer
|
||||
String[] currentTime = ((String) ct_text.getText()).split(":");
|
||||
|
||||
case 1:
|
||||
image.setImageResource(android.R.color.transparent);
|
||||
image_mid.setImageResource(R.drawable.train_left);
|
||||
image_right.setImageResource(android.R.color.transparent);
|
||||
break;
|
||||
int minute = Integer.parseInt(currentTime[0]);
|
||||
int second = Integer.parseInt(currentTime[1]);
|
||||
System.out.println("Current Minute: " + minute + " and current second: " + second);
|
||||
|
||||
case 2:
|
||||
image.setImageResource(android.R.color.transparent);
|
||||
image_mid.setImageResource(R.drawable.train_right);
|
||||
image_right.setImageResource(android.R.color.transparent);
|
||||
break;
|
||||
if (second != 0) {
|
||||
ct.cancel();
|
||||
breakTime = 0;
|
||||
if (minute == 0 && second > 0) {
|
||||
minute = 1;
|
||||
second = 0;
|
||||
} else if (minute > 0 && second > 0) {
|
||||
minute++;
|
||||
second = 0;
|
||||
}
|
||||
if (minute < 10)
|
||||
bufferZeroMinute = "0";
|
||||
if (second < 10)
|
||||
bufferZeroSecond = "0";
|
||||
|
||||
|
||||
System.out.println("New Time: " + bufferZeroMinute + minute + ":" + bufferZeroSecond + second);
|
||||
if (isRunning) {
|
||||
time = minute * 60 * 1000;
|
||||
startTimer(time);
|
||||
} else {
|
||||
stopTime = bufferZeroMinute + minute + ":" + bufferZeroSecond + second;
|
||||
ct_text.setText(stopTime);
|
||||
}
|
||||
}
|
||||
|
||||
description.setText(exerciseList.get(currentExercise).getDescription());
|
||||
|
||||
//finish();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void update() {
|
||||
breakTime++;
|
||||
|
||||
//FIXME Change to the correct picture and whether its side or repetetion
|
||||
breakTime++;
|
||||
switch (breakTime) {
|
||||
case 10:
|
||||
System.out.println("Time for Exercise: Left!");
|
||||
image_mid.setImageResource(R.drawable.train_left);
|
||||
image_right.setImageResource(android.R.color.transparent);
|
||||
image.setImageResource(android.R.color.transparent);
|
||||
side_repetition.setText("Side/Repetition 1");
|
||||
break;
|
||||
case 20:
|
||||
System.out.println("Time for Exercise: Right!");
|
||||
image_mid.setImageResource(R.drawable.train_right);
|
||||
side_repetition.setText("Side/Repetition 2");
|
||||
side_repetition.setText(R.string.exercise_repetition + " 1");
|
||||
break;
|
||||
case 30:
|
||||
System.out.println("Time for Break between sides!");
|
||||
side_repetition.setText(R.string.exercise_break);
|
||||
image.setImageResource(R.drawable.train_middle);
|
||||
break;
|
||||
case 40:
|
||||
System.out.println("Time for Exercise: Right!");
|
||||
side_repetition.setText(R.string.exercise_repetition + " 2");
|
||||
break;
|
||||
case 60:
|
||||
System.out.println("Next Exercise!");
|
||||
image.setImageResource(R.drawable.train_left);
|
||||
image_mid.setImageResource(android.R.color.transparent);
|
||||
image_right.setImageResource(R.drawable.train_right);
|
||||
image.setImageResource(R.drawable.train_right);
|
||||
breakTime = 0;
|
||||
currentExercise++;
|
||||
if (currentExercise > exerciseList.size() - 1)
|
||||
currentExercise = 0;
|
||||
description.setText(exerciseList.get(currentExercise).getDescription());
|
||||
execution.setText(exerciseList.get(currentExercise).getExecution());
|
||||
side_repetition.setText("Break");
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void startTimer(int time) {
|
||||
|
||||
ct = new CountDownTimer(time, 1000) {
|
||||
boolean timeLeft = false;
|
||||
|
||||
public void onTick(long millisUntilFinished) {
|
||||
String bufferZeroMinute = "";
|
||||
String bufferZeroSecond = "";
|
||||
|
||||
if ((millisUntilFinished / 1000) / 60 < 10)
|
||||
bufferZeroMinute = "0";
|
||||
|
||||
if (millisUntilFinished / 1000 % 60 < 10)
|
||||
bufferZeroSecond = "0";
|
||||
|
||||
ct_text.setText(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
// Update image and description of the exercise
|
||||
update();
|
||||
|
||||
// //Show how much time is left
|
||||
// timeLeft = sharedPrefs.getBoolean("notifications_new_message_timeLeft", false);
|
||||
// if (timeLeft) {
|
||||
// Notification notification = new NotificationCompat.Builder(getApplicationContext()).setCategory(Notification.CATEGORY_MESSAGE)
|
||||
// .setSmallIcon(R.drawable.ic_notifications_black_24dp)
|
||||
// .setContentTitle("Break Activity Reminder: ")
|
||||
// .setContentText(((millisUntilFinished / 1000) / 60) + "Minutes and " + (millisUntilFinished / 1000 % 60) + " seconds")
|
||||
// .setAutoCancel(true)
|
||||
// .setVisibility(NotificationCompat.VISIBILITY_PUBLIC).build();
|
||||
// NotificationManager notificationManager =
|
||||
// (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
// notificationManager.notify(999, notification);
|
||||
// }
|
||||
}
|
||||
|
||||
public void onFinish() {
|
||||
isRunning = false;
|
||||
ct_text.setText("00:00");
|
||||
//Trigger the alarm
|
||||
String ringPref = sharedPrefs.getString("notifications_new_message_ringtone", "");
|
||||
|
||||
if (!ringPref.equals("")) {
|
||||
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), Uri.parse(ringPref));
|
||||
r.play();
|
||||
}
|
||||
|
||||
//Vibration
|
||||
boolean vibrateChecked = sharedPrefs.getBoolean("notifications_new_message_vibrate", false);
|
||||
if (vibrateChecked) {
|
||||
// Get instance of Vibrator from current Context
|
||||
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
if (v != null) {
|
||||
// Vibrate for 1500 milliseconds
|
||||
v.vibrate(1500);
|
||||
}
|
||||
}
|
||||
|
||||
//Cancel the notification
|
||||
if (timeLeft) {
|
||||
NotificationManager notificationManager =
|
||||
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.cancel(999);
|
||||
}
|
||||
//Remove lag to keep screen on when the break ends
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
finish();
|
||||
}
|
||||
}.start();
|
||||
isRunning = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
|
||||
String allProfiles = sharedPrefs.getString("profiles", "");
|
||||
if (allProfiles.equals("")) {
|
||||
System.out.println("Es gibt noch keine Profile!!");
|
||||
allProfiles = "Random,90,5,false,Arms.Legs.Head.Neck.Pelvis.Spinal Column.Trunk.;Upper-Body,90,15,true,Arms.Neck.Head.;Torso,30,5,true,Spinal Column.Trunk.;Under-Body,30,5,true,Legs.Pelvis.;";
|
||||
allProfiles = this.getResources().getText(R.string.standard_profile).toString();
|
||||
editor.putString("profiles", allProfiles);
|
||||
editor.apply();
|
||||
|
||||
|
|
@ -81,9 +80,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
welcomeDialog.show(getFragmentManager(), "WelcomeDialog");
|
||||
}
|
||||
|
||||
|
||||
|
||||
System.out.println("Alle Profile: " + sharedPrefs.getString("profiles", "FAIL"));
|
||||
System.out.println("Alle Profile: " + sharedPrefs.getString("profiles", "-1"));
|
||||
|
||||
// If chosen, set screen to "stay on"
|
||||
boolean stayOn = sharedPrefs.getBoolean("notifications_stayOn", false);
|
||||
|
|
@ -116,9 +113,8 @@ public class BreakReminder extends AppCompatActivity
|
|||
String[] fillProfileNames = allProfiles.split(";");
|
||||
for (int i = 0; i < profileNames.length - 1; i++) {
|
||||
profileNames[i] = fillProfileNames[i].split(",")[0];
|
||||
System.out.println("Profile name:" + profileNames[i]);
|
||||
}
|
||||
profileNames[profileNames.length - 1] = "New Profile...";
|
||||
profileNames[profileNames.length - 1] = this.getResources().getText(R.string.new_profile).toString();
|
||||
ArrayAdapter<String> adapter = new
|
||||
ArrayAdapter<String>(this, R.layout.spinner_layout, profileNames);
|
||||
profileSpinner.setAdapter(adapter);
|
||||
|
|
@ -128,7 +124,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
|
||||
String profileSelected = (String) parent.getItemAtPosition(position);
|
||||
if (profileSelected.equals("New Profile...")) {
|
||||
if (profileSelected.equals(getResources().getText(R.string.new_profile).toString())) {
|
||||
createNewProfile();
|
||||
} else {
|
||||
updatePreference(profileSelected);
|
||||
|
|
@ -145,11 +141,9 @@ public class BreakReminder extends AppCompatActivity
|
|||
|
||||
String allProfiles = sharedPrefs.getString("profiles", "");
|
||||
|
||||
String currentProfile = sharedPrefs.getString("name_text", "") + "," + sharedPrefs.getInt("work_value", -1) + "," + sharedPrefs.getInt("break_value", -1) + "," + sharedPrefs.getBoolean("cont_value", false)+ "," + sharedPrefs.getString("exercise_value", "-1");
|
||||
String currentProfile = sharedPrefs.getString("name_text", "") + "," + sharedPrefs.getInt("work_value", -1) + "," + sharedPrefs.getInt("break_value", -1) + "," + sharedPrefs.getBoolean("cont_value", false) + "," + sharedPrefs.getString("exercise_value", "-1");
|
||||
|
||||
if (allProfiles.contains(currentProfile) && profileSelected.equals(sharedPrefs.getString("name_text", ""))) {
|
||||
System.out.println("Profile didn´t change");
|
||||
} else {
|
||||
if (!allProfiles.contains(currentProfile) && profileSelected.equals(sharedPrefs.getString("name_text", ""))) {
|
||||
if (ct != null) {
|
||||
ct.cancel();
|
||||
isRunning = false;
|
||||
|
|
@ -201,7 +195,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
for (int i = 0; i < profileNames.length - 1; i++) {
|
||||
profileNames[i] = fillProfileNames[i].split(",")[0];
|
||||
}
|
||||
profileNames[profileNames.length - 1] = "New Profile...";
|
||||
profileNames[profileNames.length - 1] = getResources().getText(R.string.new_profile).toString();
|
||||
ArrayAdapter<String> adapter = new
|
||||
ArrayAdapter<String>(this, R.layout.spinner_layout, profileNames);
|
||||
profileSpinner.setAdapter(adapter);
|
||||
|
|
@ -224,7 +218,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
profileSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
||||
String profileSelected = (String) parent.getItemAtPosition(position);
|
||||
if (profileSelected.equals("New Profile...")) {
|
||||
if (profileSelected.equals(getResources().getText(R.string.new_profile).toString())) {
|
||||
createNewProfile();
|
||||
} else {
|
||||
updatePreference(profileSelected);
|
||||
|
|
@ -249,16 +243,11 @@ public class BreakReminder extends AppCompatActivity
|
|||
else
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
System.out.println("Activity resumed!!");
|
||||
|
||||
//FIXME Add flag if New Profile or Resume
|
||||
if (sharedPrefs.getBoolean("change_profiles", false)) {
|
||||
System.out.println("Change Profiles is true!");
|
||||
fillProfiles();
|
||||
|
||||
//profileSpinner = (Spinner) findViewById(R.id.spinner);
|
||||
|
||||
|
||||
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||
editor.putBoolean("change_profiles", false);
|
||||
editor.apply();
|
||||
|
|
@ -344,85 +333,7 @@ public class BreakReminder extends AppCompatActivity
|
|||
stopTime = (String) ct_text.getText();
|
||||
isRunning = false;
|
||||
} else {
|
||||
ct = new CountDownTimer(time, 1000) {
|
||||
boolean timeLeft = false;
|
||||
|
||||
public void onTick(long millisUntilFinished) {
|
||||
String bufferZeroMinute = "";
|
||||
String bufferZeroSecond = "";
|
||||
|
||||
if ((millisUntilFinished / 1000) / 60 < 10)
|
||||
bufferZeroMinute = "0";
|
||||
|
||||
if (millisUntilFinished / 1000 % 60 < 10)
|
||||
bufferZeroSecond = "0";
|
||||
|
||||
ct_text.setText(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
updateWidgets(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
//Show how much time is left
|
||||
|
||||
timeLeft = sharedPrefs.getBoolean("notifications_new_message_timeLeft", false);
|
||||
if (timeLeft) {
|
||||
Notification notification = new NotificationCompat.Builder(getApplicationContext()).setCategory(Notification.CATEGORY_MESSAGE)
|
||||
.setSmallIcon(R.drawable.ic_notifications_black_24dp)
|
||||
.setContentTitle("Break Reminder: ")
|
||||
.setContentText("Take a break in " + ((millisUntilFinished / 1000) / 60) + " minutes and " + ((millisUntilFinished / 1000) % 60) + " seconds")
|
||||
.setAutoCancel(true)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC).build();
|
||||
NotificationManager notificationManager =
|
||||
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.notify(1000, notification);
|
||||
}
|
||||
}
|
||||
|
||||
public void onFinish() {
|
||||
isRunning = false;
|
||||
ct_text.setText("00:00");
|
||||
|
||||
updateWidgets("00:00");
|
||||
|
||||
//trigger the alarm
|
||||
String ringPref = sharedPrefs.getString("notifications_new_message_ringtone", "");
|
||||
|
||||
if (!ringPref.equals("")) {
|
||||
// Get the current ringtone
|
||||
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), Uri.parse(ringPref));
|
||||
|
||||
// Play ringtone
|
||||
r.play();
|
||||
}
|
||||
|
||||
boolean vibrateChecked = sharedPrefs.getBoolean("notifications_new_message_vibrate", false);
|
||||
if (vibrateChecked) {
|
||||
// Get instance of Vibrator from current Context
|
||||
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
if (v == null) {
|
||||
System.out.println("No vibrator! :D");
|
||||
} else {
|
||||
// Vibrate for 1500 milliseconds
|
||||
v.vibrate(1500);
|
||||
}
|
||||
}
|
||||
|
||||
//Cancel the notification
|
||||
if (timeLeft) {
|
||||
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.cancel(1000);
|
||||
}
|
||||
startBreak();
|
||||
|
||||
String workTime = "" + sharedPrefs.getInt("work_value", 0);
|
||||
if(workTime.length() == 1)
|
||||
workTime = "0" + workTime;
|
||||
|
||||
ct_text.setText(workTime + ":00");
|
||||
updateWidgets(workTime + ":00");
|
||||
}
|
||||
}.start();
|
||||
isRunning = true;
|
||||
startTimer(time);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -457,6 +368,87 @@ public class BreakReminder extends AppCompatActivity
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void startTimer(int time) {
|
||||
ct = new CountDownTimer(time, 1000) {
|
||||
boolean timeLeft = false;
|
||||
|
||||
public void onTick(long millisUntilFinished) {
|
||||
String bufferZeroMinute = "";
|
||||
String bufferZeroSecond = "";
|
||||
|
||||
if ((millisUntilFinished / 1000) / 60 < 10)
|
||||
bufferZeroMinute = "0";
|
||||
|
||||
if (millisUntilFinished / 1000 % 60 < 10)
|
||||
bufferZeroSecond = "0";
|
||||
|
||||
ct_text.setText(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
updateWidgets(bufferZeroMinute + (millisUntilFinished / 1000) / 60 + ":" + bufferZeroSecond + millisUntilFinished / 1000 % 60);
|
||||
|
||||
//Show how much time is left
|
||||
|
||||
timeLeft = sharedPrefs.getBoolean("notifications_new_message_timeLeft", false);
|
||||
if (timeLeft) {
|
||||
Notification notification = new NotificationCompat.Builder(getApplicationContext()).setCategory(Notification.CATEGORY_MESSAGE)
|
||||
.setSmallIcon(R.drawable.ic_notifications_black_24dp)
|
||||
.setContentTitle("Break Reminder: ")
|
||||
.setContentText("Take a break in " + ((millisUntilFinished / 1000) / 60) + " minutes and " + ((millisUntilFinished / 1000) % 60) + " seconds")
|
||||
.setAutoCancel(true)
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC).build();
|
||||
NotificationManager notificationManager =
|
||||
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.notify(1000, notification);
|
||||
}
|
||||
}
|
||||
|
||||
public void onFinish() {
|
||||
isRunning = false;
|
||||
ct_text.setText("00:00");
|
||||
|
||||
updateWidgets("00:00");
|
||||
|
||||
//trigger the alarm
|
||||
String ringPref = sharedPrefs.getString("notifications_new_message_ringtone", "");
|
||||
|
||||
if (!ringPref.equals("")) {
|
||||
// Get the current ringtone
|
||||
Ringtone r = RingtoneManager.getRingtone(getApplicationContext(), Uri.parse(ringPref));
|
||||
|
||||
// Play ringtone
|
||||
r.play();
|
||||
}
|
||||
|
||||
boolean vibrateChecked = sharedPrefs.getBoolean("notifications_new_message_vibrate", false);
|
||||
if (vibrateChecked) {
|
||||
// Get instance of Vibrator from current Context
|
||||
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
if (v != null) {
|
||||
// Vibrate for 1500 milliseconds
|
||||
v.vibrate(1500);
|
||||
}
|
||||
}
|
||||
|
||||
//Cancel the notification
|
||||
if (timeLeft) {
|
||||
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
|
||||
notificationManager.cancel(1000);
|
||||
}
|
||||
startBreak();
|
||||
|
||||
String workTime = "" + sharedPrefs.getInt("work_value", 0);
|
||||
if (workTime.length() == 1)
|
||||
workTime = "0" + workTime;
|
||||
|
||||
ct_text.setText(workTime + ":00");
|
||||
updateWidgets(workTime + ":00");
|
||||
}
|
||||
}.start();
|
||||
isRunning = true;
|
||||
}
|
||||
|
||||
private void createNewProfile() {
|
||||
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||
editor.putBoolean("change_profiles", true);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import android.database.sqlite.SQLiteException;
|
|||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
|
@ -38,20 +39,22 @@ public class DBHandler extends SQLiteOpenHelper {
|
|||
|
||||
|
||||
DEVICE_LANGUAGE = Locale.getDefault().getLanguage();
|
||||
if(!DEVICE_LANGUAGE.equals("de") && !DEVICE_LANGUAGE.equals("fr") && !DEVICE_LANGUAGE.equals("ru"))
|
||||
DEVICE_LANGUAGE = "en";
|
||||
System.out.println("Current Language: " + DEVICE_LANGUAGE);
|
||||
//If Database exists open
|
||||
if (checkDataBase()) {
|
||||
openDataBase();
|
||||
} else {
|
||||
|
||||
//Check if database exists
|
||||
File databaseFile = mContext.getDatabasePath(DATABASE_NAME);
|
||||
if (false == databaseFile.exists()) {
|
||||
this.getReadableDatabase();
|
||||
try {
|
||||
this.getReadableDatabase();
|
||||
copyDataBase();
|
||||
this.close();
|
||||
openDataBase();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
Log.v("db log", "Copying data didn´t work!!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -83,8 +86,6 @@ public class DBHandler extends SQLiteOpenHelper {
|
|||
Exercise exercise;
|
||||
List<Exercise> exerciseList = new ArrayList<>();
|
||||
dataBase = this.getReadableDatabase();
|
||||
if (DEVICE_LANGUAGE.equals("de"))
|
||||
section = "nacken";
|
||||
|
||||
Cursor res = dataBase.rawQuery("SELECT * FROM EXERCISES_" + DEVICE_LANGUAGE + " WHERE " + EXERCISES_SECTION + " LIKE " + "\"%" + section + "%\"", null);
|
||||
res.moveToFirst();
|
||||
|
|
@ -98,25 +99,6 @@ public class DBHandler extends SQLiteOpenHelper {
|
|||
return exerciseList;
|
||||
}
|
||||
|
||||
|
||||
private boolean checkDataBase() {
|
||||
dataBase = null;
|
||||
boolean exist = false;
|
||||
try {
|
||||
String dbPath = DATABASE_PATH + DATABASE_NAME;
|
||||
dataBase = SQLiteDatabase.openDatabase(dbPath, null,
|
||||
SQLiteDatabase.OPEN_READONLY);
|
||||
} catch (SQLiteException e) {
|
||||
Log.v("db log", "Database doesn't exist!!");
|
||||
}
|
||||
|
||||
if (dataBase != null) {
|
||||
exist = true;
|
||||
closeDataBase();
|
||||
}
|
||||
return exist;
|
||||
}
|
||||
|
||||
public void openDataBase() throws SQLException {
|
||||
String dbPath = DATABASE_PATH + DATABASE_NAME;
|
||||
dataBase = SQLiteDatabase.openDatabase(dbPath, null, SQLiteDatabase.OPEN_READWRITE);
|
||||
|
|
|
|||
|
|
@ -27,11 +27,6 @@ public class ExerciseListPreference extends ListPreference implements DialogInte
|
|||
mClickedDialogEntryIndices = new boolean[getEntries().length];
|
||||
}
|
||||
|
||||
public ExerciseListPreference(Context context) {
|
||||
this(context, null);
|
||||
mClickedDialogEntryIndices = new boolean[getEntries().length];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected View onCreateDialogView() {
|
||||
|
||||
|
|
@ -51,7 +46,7 @@ public class ExerciseListPreference extends ListPreference implements DialogInte
|
|||
CharSequence[] entries = getEntries();
|
||||
CharSequence[] entryValues = getEntryValues();
|
||||
|
||||
if (entries == null || entryValues == null || entries.length != entryValues.length ) {
|
||||
if (entries == null || entryValues == null || entries.length != entryValues.length) {
|
||||
throw new IllegalStateException(
|
||||
"ListPreference requires an entries array and an entryValues array which are both the same length");
|
||||
}
|
||||
|
|
@ -67,18 +62,17 @@ public class ExerciseListPreference extends ListPreference implements DialogInte
|
|||
|
||||
private void restoreCheckedEntries() {
|
||||
CharSequence[] entryValues = getEntries();
|
||||
System.out.println("VALUE-CHECK" + getValue());
|
||||
|
||||
for ( int j=0; j<exercises.length; j++ ) {
|
||||
String val = exercises[j].trim();
|
||||
for ( int i=0; i<entryValues.length; i++ ) {
|
||||
CharSequence entry = entryValues[i];
|
||||
if ( entry.equals(val) ) {
|
||||
mClickedDialogEntryIndices[i] = true;
|
||||
break;
|
||||
}
|
||||
for (int j = 0; j < exercises.length; j++) {
|
||||
String val = exercises[j].trim();
|
||||
for (int i = 0; i < entryValues.length; i++) {
|
||||
CharSequence entry = entryValues[i];
|
||||
if (entry.equals(val)) {
|
||||
mClickedDialogEntryIndices[i] = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -89,24 +83,20 @@ public class ExerciseListPreference extends ListPreference implements DialogInte
|
|||
|
||||
@Override
|
||||
protected void onDialogClosed(boolean positiveResult) {
|
||||
// super.onDialogClosed(positiveResult);
|
||||
|
||||
CharSequence[] entryValues = getEntries();
|
||||
String exs = "";
|
||||
if (positiveResult && entryValues != null) {
|
||||
for ( int i=0; i<entryValues.length; i++ ) {
|
||||
if ( mClickedDialogEntryIndices[i] ) {
|
||||
for (int i = 0; i < entryValues.length; i++) {
|
||||
if (mClickedDialogEntryIndices[i]) {
|
||||
exs += entryValues[i] + ".";
|
||||
}
|
||||
}
|
||||
|
||||
//if (callChangeListener(exs)) {
|
||||
// if ( exs.length() > 0 )
|
||||
// exs = exs.substring(0, exs.length());
|
||||
// setValue(exs);
|
||||
//}
|
||||
}
|
||||
|
||||
if (exs.equals(""))
|
||||
exs = "-1";
|
||||
|
||||
SharedPreferences.Editor editor = sharedPreferences.edit();
|
||||
editor.putString("exercise_value", exs);
|
||||
editor.apply();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class ProfileActivity extends AppCompatActivity implements View.OnClickLi
|
|||
setContentView(R.layout.new_profile);
|
||||
|
||||
sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
oldExerciseValue = sharedPrefs.getString("exercise_value","-1");
|
||||
oldExerciseValue = sharedPrefs.getString("exercise_value", "-1");
|
||||
|
||||
SharedPreferences.Editor editor = sharedPrefs.edit();
|
||||
editor.putString("exercise_value", "-1");
|
||||
|
|
@ -40,14 +40,14 @@ public class ProfileActivity extends AppCompatActivity implements View.OnClickLi
|
|||
break_seekbar.setProgress(1);
|
||||
|
||||
interval_text = (TextView) findViewById(R.id.interval_text);
|
||||
interval_text.setText("1 Minutes");
|
||||
interval_text.setText("1 " + getResources().getText(R.string.settings_unit));
|
||||
break_text = (TextView) findViewById(R.id.break_text);
|
||||
break_text.setText("1 Minutes");
|
||||
break_text.setText("1 " + getResources().getText(R.string.settings_unit));
|
||||
|
||||
interval_seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
interval_text.setText(progress + " Minutes");
|
||||
interval_text.setText(progress + " " + getResources().getText(R.string.settings_unit));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -62,7 +62,7 @@ public class ProfileActivity extends AppCompatActivity implements View.OnClickLi
|
|||
break_seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
||||
break_text.setText(progress + " Minutes");
|
||||
break_text.setText(progress + " " + getResources().getText(R.string.settings_unit));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -147,7 +147,6 @@ public class ProfileActivity extends AppCompatActivity implements View.OnClickLi
|
|||
private void createExerciseType() {
|
||||
Intent intent = new Intent(this, ExerciseTypeActivity.class);
|
||||
this.startActivity(intent);
|
||||
System.out.println("Exercise Type Activity!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="@string/exercise_type"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewBreak"
|
||||
|
|
@ -47,43 +47,20 @@
|
|||
android:layout_below="@+id/textViewBreak"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/side_repetition"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignWithParentIfMissing="false"
|
||||
android:layout_below="@+id/textSideRepetition"
|
||||
android:layout_toLeftOf="@+id/break_exercise_type"
|
||||
android:layout_toStartOf="@+id/break_exercise_type"
|
||||
android:contentDescription="Current Exercise" />
|
||||
android:text="@string/exercise_break"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="@color/yellow"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageMid"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_alignBottom="@+id/imageView"
|
||||
android:layout_alignEnd="@+id/break_exercise_type"
|
||||
android:layout_alignRight="@+id/break_exercise_type"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignWithParentIfMissing="false"
|
||||
android:layout_below="@+id/textSideRepetition"
|
||||
android:layout_toRightOf="@+id/imageView"
|
||||
android:contentDescription="Current Exercise" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageRight"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_alignTop="@+id/imageMid"
|
||||
android:layout_alignWithParentIfMissing="false"
|
||||
android:layout_toEndOf="@+id/imageMid"
|
||||
android:layout_toRightOf="@+id/imageMid"
|
||||
android:contentDescription="Current Exercise" />
|
||||
android:layout_below="@+id/textSideRepetition" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_next"
|
||||
|
|
@ -101,27 +78,42 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/button_next"
|
||||
android:layout_alignEnd="@+id/imageRight"
|
||||
android:layout_alignRight="@+id/imageRight"
|
||||
android:layout_below="@+id/imageMid">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/break_execution"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewExecution"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/break_ex"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="@string/break_description"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewDescription"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="41dp"
|
||||
android:gravity="left|center"
|
||||
android:text="@string/break_explanation"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp" />
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
|
|
|||
48
app/src/main/res/layout/activity_break_no_exercises.xml
Normal file
48
app/src/main/res/layout/activity_break_no_exercises.xml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:text="@string/new_profile_break"
|
||||
android:id="@+id/textView21"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignRight="@+id/textViewBreak"
|
||||
android:layout_alignEnd="@+id/textViewBreak"
|
||||
android:layout_alignLeft="@+id/textViewBreak"
|
||||
android:layout_alignStart="@+id/textViewBreak"
|
||||
android:gravity="center" />
|
||||
<TextView
|
||||
android:id="@+id/textViewBreak1"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="250dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/circle"
|
||||
android:clickable="true"
|
||||
android:enabled="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/_10_00"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textIsSelectable="false"
|
||||
android:textSize="80sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
android:background="@drawable/button_normal"
|
||||
android:text="@string/cancel" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
android:text="@string/profile_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:textSize="10sp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center" />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
android:text="@string/profile_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
android:textSize="14dp"
|
||||
android:gravity="center"
|
||||
android:layout_above="@+id/time"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
android:text="@string/profile_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="25dp"
|
||||
android:textSize="22dp"
|
||||
android:gravity="center"
|
||||
android:layout_above="@+id/time"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
android:text="@string/profile_name"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="35dp"
|
||||
android:textSize="30dp"
|
||||
android:gravity="center"
|
||||
android:layout_above="@+id/time"
|
||||
android:layout_centerHorizontal="true" />
|
||||
|
|
|
|||
|
|
@ -4,222 +4,231 @@
|
|||
android:layout_height="fill_parent">
|
||||
|
||||
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="1"
|
||||
android:layout_margin="20dp"
|
||||
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
|
||||
<TextView
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_click_information"
|
||||
android:id="@+id/textView20"
|
||||
android:layout_alignParentTop="true"
|
||||
android:textSize="10pt"
|
||||
android:textColor="@color/yellow"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center_horizontal"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_start_screen_title"
|
||||
android:id="@+id/textView10"
|
||||
android:textSize="12pt"
|
||||
android:layout_below="@+id/textView20"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView"
|
||||
android:src="@drawable/start_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="130dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/textView10"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_start_screen"
|
||||
android:id="@+id/textView9"
|
||||
android:layout_toRightOf="@+id/imageView"
|
||||
android:layout_below="@+id/textView10"
|
||||
android:textSize="7pt"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_settings_screen_title"
|
||||
android:id="@+id/textView11"
|
||||
android:textSize="12pt"
|
||||
android:layout_below="@+id/imageView"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="20dp"
|
||||
android:orientation="vertical"
|
||||
android:scrollbarAlwaysDrawVerticalTrack="true"
|
||||
android:scrollbars="vertical"
|
||||
android:weightSum="1">
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView1"
|
||||
android:src="@drawable/settings_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="210dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/textView11"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
<TextView
|
||||
android:id="@+id/textView20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/help_click_information"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="@color/yellow"
|
||||
android:textSize="10pt"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_settings_screen"
|
||||
android:id="@+id/textView12"
|
||||
android:layout_toRightOf="@+id/imageView1"
|
||||
android:layout_below="@+id/textView11"
|
||||
android:textSize="6pt"/>
|
||||
<TextView
|
||||
android:id="@+id/textView10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView20"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/help_start_screen_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12pt" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView4"
|
||||
android:src="@drawable/general_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="130dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/imageView1"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView10"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="130dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/start_screen" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_settings_screen1"
|
||||
android:id="@+id/textView18"
|
||||
android:layout_toRightOf="@+id/imageView4"
|
||||
android:layout_below="@+id/imageView1"
|
||||
android:textSize="6pt"/>
|
||||
<TextView
|
||||
android:id="@+id/textView9"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView10"
|
||||
android:layout_toRightOf="@+id/imageView"
|
||||
android:text="@string/help_start_screen"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="7pt" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView5"
|
||||
android:src="@drawable/notification_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="130dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_settings_screen2"
|
||||
android:id="@+id/textView19"
|
||||
android:layout_toRightOf="@+id/imageView5"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:textSize="6pt"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_create_profile_screen_title"
|
||||
android:id="@+id/textView13"
|
||||
android:textSize="12pt"
|
||||
android:layout_below="@+id/imageView5"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"/>
|
||||
<TextView
|
||||
android:id="@+id/textView11"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/help_settings_screen_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12pt" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView2"
|
||||
android:src="@drawable/create_profile_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="130dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/textView13"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
<ImageView
|
||||
android:id="@+id/imageView1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView11"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="210dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/settings_screen" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_create_profile_screen"
|
||||
android:id="@+id/textView14"
|
||||
android:layout_toRightOf="@+id/imageView2"
|
||||
android:layout_below="@+id/textView13"
|
||||
android:textSize="6pt"/>
|
||||
<TextView
|
||||
android:id="@+id/textView12"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView11"
|
||||
android:layout_toRightOf="@+id/imageView1"
|
||||
android:text="@string/help_settings_screen"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="6pt" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_break_screen_title"
|
||||
android:id="@+id/textView15"
|
||||
android:textSize="12pt"
|
||||
android:layout_below="@+id/imageView2"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="15dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/imageView4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView1"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="130dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/general_screen" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView18"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView1"
|
||||
android:layout_toRightOf="@+id/imageView4"
|
||||
android:text="@string/help_settings_screen1"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="6pt"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="130dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/notification_screen" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView19"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView4"
|
||||
android:layout_toRightOf="@+id/imageView5"
|
||||
android:text="@string/help_settings_screen2"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="6pt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView13"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView5"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/help_create_profile_screen_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12pt" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/imageView3"
|
||||
android:src="@drawable/create_profile_screen"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="130dp"
|
||||
android:maxHeight="190dp"
|
||||
android:layout_below="@+id/textView15"
|
||||
android:layout_gravity="top|left"
|
||||
android:clickable="true"
|
||||
android:onClick="clickHandler"/>
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView13"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="130dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/create_profile_screen" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="@string/help_break_screen"
|
||||
android:id="@+id/textView16"
|
||||
android:layout_toRightOf="@+id/imageView3"
|
||||
android:layout_below="@+id/textView15"
|
||||
android:textSize="6pt"/>
|
||||
<TextView
|
||||
android:id="@+id/textView14"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView13"
|
||||
android:layout_toRightOf="@+id/imageView2"
|
||||
android:text="@string/help_create_profile_screen"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="6pt" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView15"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView2"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/help_break_screen_title"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12pt" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text=""
|
||||
android:id="@+id/textView17"
|
||||
android:textSize="12pt"
|
||||
android:layout_below="@+id/imageView3"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"/>
|
||||
</RelativeLayout>
|
||||
<ImageView
|
||||
android:id="@+id/imageView3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView15"
|
||||
android:layout_gravity="top|left"
|
||||
android:adjustViewBounds="true"
|
||||
android:clickable="true"
|
||||
android:maxHeight="190dp"
|
||||
android:maxWidth="130dp"
|
||||
android:onClick="clickHandler"
|
||||
android:src="@drawable/create_profile_screen" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView16"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView15"
|
||||
android:layout_toRightOf="@+id/imageView3"
|
||||
android:text="@string/help_break_screen"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="6pt" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/textView16"
|
||||
android:gravity="center"
|
||||
android:text="@string/disclaimer" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView17"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/imageView3"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:text=""
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textSize="12pt" />
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:inputType="text"
|
||||
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-"
|
||||
android:maxLength="10"
|
||||
android:maxLength="12"
|
||||
android:textSize="25sp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentRight="true"
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
android:id="@+id/button_profile_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_profile_save"
|
||||
android:text="@string/save"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/button_normal"
|
||||
android:textColor="@color/white" />
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
android:id="@+id/button_profile_cancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/new_profile_cancel"
|
||||
android:text="@string/cancel"
|
||||
android:background="@drawable/button_normal"
|
||||
android:textColor="@color/white"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:id="@+id/break_text"
|
||||
android:text="0"
|
||||
android:text="@string/_0"
|
||||
android:layout_alignTop="@+id/textView5"
|
||||
android:layout_alignLeft="@+id/interval_text"
|
||||
android:layout_alignStart="@+id/interval_text" />
|
||||
|
|
|
|||
89
app/src/main/res/values-de/strings.xml
Normal file
89
app/src/main/res/values-de/strings.xml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">Break Reminder</string>
|
||||
<string name="about_affiliation">In Zusammenarbeit mit</string>
|
||||
<string name="about_author">Die Autoren dieser App:</string>
|
||||
<string name="add">Hinzufügen</string>
|
||||
<string name="break_description">Beschreibung:</string>
|
||||
<string name="break_ex">Ausführung der Übung</string>
|
||||
<string name="break_execution">Ausführung:</string>
|
||||
<string name="break_explanation">Beschreibung der Übung:</string>
|
||||
<string name="break_reminder_time" translatable="false"></string>
|
||||
<string name="cancel">Abbrechen</string>
|
||||
<string name="continuously">Falls gesetzt, gibt es keine Möglichkeit die Pause zu überspringen</string>
|
||||
<string name="do_you_want_to_take_the_break">Möchten Sie die Pause nehmen?</string>
|
||||
<string name="exercise_break">Pause</string>
|
||||
<string name="exercise_description">Stellen Sie sicher, dass sie einige Übungen ausgewählt haben! Sollte nichts ausgewählt sein, wird es keine Übungen in der Pause geben</string>
|
||||
<string name="exercise_repetition">Wiederholung</string>
|
||||
<string name="exercise_side">Seite</string>
|
||||
<string name="exercise_summary">Deine Pause wird Übungen für folgende Regionen enthalten:</string>
|
||||
<string name="exercise_type">Übungstyp</string>
|
||||
<string name="help">Hilfe</string>
|
||||
<string name="help_break_screen">1. Körperbereich ihrer aktuellen Übung.\n2. Die Uhr zeigt die verbleibende Zeit für die Pause an. Beim Klicken darauf startet oder hält die Zeit an.\n3. Zeigt der Bildschirm den Schriftzug \'Pause\' an, befindet man sich in einer 10Sek Pause. Dabei sieht man ein Vorschaubild der kommenden Übung. Sollte \'Seite 1/2\' oder \'Wiederholung 1/2\' angezeigt werden, soll die gezeigte und beschriebene Übung ausgeführt werden.\n4. Erläuterung der Ausgangslage.\n5. Beschreibung der Übung </string>
|
||||
<string name="help_break_screen_title">Pausenbildschirm</string>
|
||||
<string name="help_click_information">Um die Bilder in voller Größe zu betrachten, klicken sie auf die Bilder. Um die Bilder auf ursprüngliche Größe zu verkleinern, klicken Sie erneut auf das Bild!</string>
|
||||
<string name="help_create_profile_screen">1. Wähle den Namen des Profils aus.\n2. Wählen Sie einen Arbeitsintervall aus.\n3. Wählen Sie eine Pausenlänge aus.\n4. Drücken Sie auf \'Auswählen\', um für Sie passende Übung auszuwählen. Sollten Sie keine Übungen in ihre Pause wünschen, ignorieren Sie diesen Knopf.\n5. Falls Sie diese Option auswählen, können Sie die Pause nicht überspringen.</string>
|
||||
<string name="help_create_profile_screen_title">Erstellen eines neuen Profil Bildschirms</string>
|
||||
<string name="help_settings_screen">1. Öffnen Sie das Seitenmenü oben links und wählen Sie \'Settings\' aus.\n2. Wählen Sie \'Allgemein\' aus, um die Einstellungen des Profils zu öffnen.\n3. Wählen Sie \'Benachrichtigungen\' aus, um die Benachrichtigungen ein- oder auszuschalten.</string>
|
||||
<string name="help_settings_screen1">1. Wählen Sie das zu ändernde Profil aus.\n2. Geben Sie den neuen Namen ein.\n3. Ändern des Arbeitsinvalls.\n4. Ändern der Pausenzeit.\n5. Wählen Sie \'Kontinuierlich\' aus, falls Sie die Pause nicht überspringen wollen.\n6. Wählen Sie die Körperbereiche aus, die Sie in der Pause ansprechen wollen.</string>
|
||||
<string name="tutorial_or">oder</string>
|
||||
<string name="help_settings_screen2">1. Wählen Sie den Klingelton aus.\n2. Falls ausgewählt, vibriert ihr Gerät.\n3. Entscheiden Sie, ob Sie die Benachrichtung haben wollen, wie lange es bis zu der Pause dauert beziehungsweise wie lange Sie noch zu arbeiten haben.\n4. Sollte diese Option ausgewählt sein, bleibt der Startbildschirm an</string>
|
||||
<string name="help_start_screen_title">Starttbildschirm</string>
|
||||
<string name="help_settings_screen_title">Einstellungsbildschirm</string>
|
||||
<string name="help_start_screen">1. Klicken Sie auf die Fläche, um die Profile einzusehen und auszuwählen.\n2. Die Uhr zeigt die Zeit an und fungiert als Knopf, der die Zeit starten und stoppen kann.\n3. Der Knopf startet und stopt die Zeit.\n4. Der Knopf setzt die Zeit zurück.</string>
|
||||
<string name="information">Information</string>
|
||||
<string name="interval">Intervall</string>
|
||||
<string name="disclaimer">DISCLAIMER Platzhalter</string>
|
||||
<string name="more_info">Mehr Information finden Sie hier:</string>
|
||||
<string name="navigation_drawer_close"></string>
|
||||
<string name="new_profile_break">Pause</string>
|
||||
<string name="new_profile_continuously">Kontinuierlich</string>
|
||||
<string name="new_profile_doubleName">Geben Sie einen anderen Namen ein! Es existiert schon ein Profil mit demselben Namen!</string>
|
||||
<string name="new_profile_emptyName">Bitte geben Sie einen Namen für das Profil ein!</string>
|
||||
<string name="new_profile_select">Auswählen</string>
|
||||
<string name="pref_current_exercises">Auswahl der Übungen</string>
|
||||
<string name="pref_current_profile">Auswahl des Profils</string>
|
||||
<string name="pref_default_display_name">Zufall</string>
|
||||
<string name="pref_header_general">Allgemein</string>
|
||||
<string name="pref_header_notifications">Benachrichtigungen</string>
|
||||
<string name="pref_ringtone_silent">Lautlos</string>
|
||||
<string name="pref_title_display_name">Profil Name</string>
|
||||
<string name="pref_title_stayOn">Bildschirm bleibt an</string>
|
||||
<string name="pref_title_ringtone">Klingelton</string>
|
||||
<string name="tutorial_profile_description">Beim Klicken auf das aktuell ausgewählte Profils (\'Zufall\'), werden alle verfügbare Profile angezeigt.\n Sie können ein neues Profil durch das Klicken auf \'Neues Profil...\' erstellen.\n Die verfügbaren Profile können Sie in den Einstellungen ändern.</string>
|
||||
<string name="tutorial_clock_description">Beim Klicken auf eins der beiden Symbole, startet die Uhr oder hält diese an</string>
|
||||
<string name="pref_title_timeLeft">Verbleibende Zeit</string>
|
||||
<string name="pref_title_vibrate">Vibration</string>
|
||||
<string name="profile_name">Profil Name</string>
|
||||
<string name="privacy_friendly">Diese Applikation gehört der Privacy Friendly Apps.</string>
|
||||
<string name="save">Speichern</string>
|
||||
<string name="settings_break_summary">Derzeitiger Wert ist $1</string>
|
||||
<string name="settings_dialog_message">Wählen Sie ihren Arbeitsintevall aus</string>
|
||||
<string name="settings_break_title">Wählen Sie ihre Pausenzeit aus</string>
|
||||
<string name="settings_doubleName">Die </string>
|
||||
<string name="settings_emptyName">Die Änderungen konnten nicht gespeichert werden, da das Feld für den Profilnamen leer ist! </string>
|
||||
<string name="settings_title">Wählen Sie ihren Arbeitsintervall aus</string>
|
||||
<string name="settings_summary">Derzeitiger Wert ist $1</string>
|
||||
<string name="settings_unit">Minuten</string>
|
||||
<string name="skip_the_break">Überspringen</string>
|
||||
<string name="standard_profile">Zufall,90,5,false,Arme.Beine.Kopf.Nacken.Becken.Wirbelsaeule.Rumpf;Oberkoerper,90,15,true,Arme.Nacken.Kopf.;Rumpf,30,5,true,Wirbelsauele.Rumpf.;Unterkoerper,30,5,true,Beine.Becken.;</string>
|
||||
<string name="take_the_break">Pause nehmen</string>
|
||||
<string name="title_activity_settings">Einstellungen</string>
|
||||
<string name="tutorial_clock">Starten/Anhalten der Uhr</string>
|
||||
<string name="tutorial_description">Willkommen zur Privacy Friendly Break Reminder</string>
|
||||
<string name="tutorial_profiles">Auswahl des Profils</string>
|
||||
<string name="tutorial_reset">Zurücksetzen der Uhr</string>
|
||||
<string name="tutorial_reset_description">Drücken Sie den Knopf, um die Uhr zurückzusetzen</string>
|
||||
<string name="type">Typ</string>
|
||||
|
||||
<string-array name="type_spinner">
|
||||
<item>Kopf</item>
|
||||
<item>Nacken</item>
|
||||
<item>Arme</item>
|
||||
<item>Rumpf</item>
|
||||
<item>Wirbelsauele</item>
|
||||
<item>Becken</item>
|
||||
<item>Beine</item>
|
||||
</string-array>
|
||||
<string name="new_profile">Neues Profil...</string>
|
||||
</resources>
|
||||
|
|
@ -1,111 +1,93 @@
|
|||
<resources>
|
||||
<string name="app_name">Break Reminder</string>
|
||||
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="navigation_drawer_open" translatable="false">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close" translatable="false">Close navigation drawer</string>
|
||||
|
||||
<!-- Strings related to Settings -->
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="statistics">Statistics</string>
|
||||
<string name="information">Information</string>
|
||||
<string name="help">Help</string>
|
||||
|
||||
<!-- General settings -->
|
||||
<!-- Strings for the Interval-Slider -->
|
||||
<string name="settings_dialog_message">Select your work interval</string>
|
||||
<string name="settings_summary">Current value is $1</string>
|
||||
<string name="settings_unit">Minutes</string>
|
||||
<string name="settings_title">Select your work Interval</string>
|
||||
<string name="settings_title">Select your work interval</string>
|
||||
|
||||
<!-- Strings for the Break-Slider -->
|
||||
<string name="settings_break_dialog_message">Select your break time</string>
|
||||
<string name="settings_break_summary">Current value is $1</string>
|
||||
<string name="settings_break_title">Select your break time</string>
|
||||
|
||||
<!-- Strings for Name -->
|
||||
<string name="pref_header_general">General</string>
|
||||
<string name="pref_title_display_name">Profile name</string>
|
||||
<string name="pref_default_display_name">Pomodoro</string>
|
||||
<string name="pref_default_display_name">Random</string>
|
||||
<string name="pref_current_profile">Select profile</string>
|
||||
<string name="pref_current_exercises">Select exercises</string>
|
||||
<string name="pref_title_cont">Continuously</string>
|
||||
<string name="pref_default_profile">Sport</string>
|
||||
|
||||
|
||||
<!-- settings for BreakReminder -->
|
||||
<string name= "new_profile">New Profile...</string>
|
||||
<string name="play_stop" translatable="false">Play/Stop</string>
|
||||
<string name="reset" translatable="false">Reset</string>
|
||||
<string name="break_reminder_time" translatable="false">30:00</string>
|
||||
<string name="standard_profile">Random,90,5,false,Arms.Legs.Head.Neck.Pelvis.Spinal Column.Torso.;Upper-Body,90,15,true,Arms.Neck.Head.;Torso,30,5,true,Spinal Column.Torso.;Lower-Body,30,5,true,Legs.Pelvis.;</string>
|
||||
|
||||
<!-- settings for Notifications -->
|
||||
<string name="pref_header_notifications">Notifications</string>
|
||||
|
||||
<string name="pref_title_new_message_notifications">Allowing notifications</string>
|
||||
|
||||
<string name="pref_title_ringtone">Ringtone</string>
|
||||
<string name="pref_ringtone_silent">Silent</string>
|
||||
<string name="pref_title_stayOn">Screen stays on</string>
|
||||
<string name="pref_title_timeLeft">Time left</string>
|
||||
<string name="pref_title_vibrate">Vibrate</string>
|
||||
<string name="play_stop">Play/Stop</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="break_reminder_time" translatable="false">30:00</string>
|
||||
<string name="exercise_name">Exercise-name</string>
|
||||
<string name="exercise_time">Exercise time</string>
|
||||
<string name="repetitions">Repetitions</string>
|
||||
<string name="pref_title_vibrate">Vibration</string>
|
||||
|
||||
<!-- settings for ProfileActivity -->
|
||||
<string name="_0" translatable="false">0</string>
|
||||
<string name="type">Type</string>
|
||||
<string name="sequential">Sequential</string>
|
||||
<string name="add">Add</string>
|
||||
<string name="edit">Edit</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="profile_name">Profile Name</string>
|
||||
<string name="interval">Interval</string>
|
||||
<string name="exercise_type">Exercise Type</string>
|
||||
|
||||
|
||||
<string name="_0" translatable="false">0</string>
|
||||
<!-- settings for BreakDeciderActivity -->
|
||||
<string name="take_the_break">Take the Break</string>
|
||||
<string name="skip_the_break">Skip the Break</string>
|
||||
<string name="do_you_want_to_take_the_break">Do you want to take the break?</string>
|
||||
<string name="_10_00" translatable="false">10:00</string>
|
||||
<string name="name_of_the_exercise">name of the Exercise</string>
|
||||
<string name="break_cancel">Cancel</string>
|
||||
<string name="break_play_stop">Play/Stop</string>
|
||||
<string name="break_reminder">Break Reminder</string>
|
||||
<string name="statistics">Statistics</string>
|
||||
<string name="information">Information</string>
|
||||
<string name="help">Help</string>
|
||||
|
||||
<!--settings for SettingsActivity -->
|
||||
<string name="settings_emptyName">The changes could not be applied because the name for the profile was empty!</string>
|
||||
<string name="settings_doubleName">The changes could not be applied because there is already a profile with the same name!</string>
|
||||
|
||||
<!--settings for ProfileActivity -->
|
||||
<string name="new_profile_save">Save</string>
|
||||
<string name="new_profile_cancel">Cancel</string>
|
||||
<string name="new_profile_break">Break</string>
|
||||
<string name="new_profile_select">Select</string>
|
||||
<string name="new_profile_continuously">Continuously</string>
|
||||
<string name="new_profile_emptyName">Please enter a name for the profile</string>
|
||||
<string name="new_profile_emptyName">Please enter a name for the profile!</string>
|
||||
<string name="new_profile_doubleName">Enter another name, there is already a profile with the same name!</string>
|
||||
<string name="continuously">If checked, there will be no possibility to skip the break</string>
|
||||
<string name="exercise_description">Make sure to select some exercises! If nothing is selected, there will be no exercises in the break!</string>
|
||||
|
||||
<!-- settings for AboutActivity -->
|
||||
<string name="about">About</string>
|
||||
<string name="app_name_long">Privacy Friendly Break Reminder</string>
|
||||
<string name="version_number">1.0</string>
|
||||
<string name="about" translatable="false">About</string>
|
||||
<string name="app_name_long" translatable="false">Privacy Friendly Break Reminder</string>
|
||||
<string name="version_number" translatable="false">v1.0</string>
|
||||
<string name="about_author">Authors of the App:</string>
|
||||
<string name="about_author_names" translatable="false">Sergej Alexeev, \n Jannik Schildknecht</string>
|
||||
<string name="about_affiliation">In Affiliation with</string>
|
||||
<string name="privacy_friendly">This application belongs to the Privacy Friendly Apps.</string>
|
||||
<string name="more_info">More Information can be found here:</string>
|
||||
<string name="url" translatable="false"><a href="https://www.secuso.informatik.tu-darmstadt.de/en/research/results/">https://www.secuso.org</a></string>
|
||||
<string name="break_explanation">You have to train your chest hard! Eat healthy</string>
|
||||
<string name="appwidget_text">EXAMPLE</string>
|
||||
<string name="add_widget">Add widget</string>
|
||||
|
||||
<!-- settings for BreakActivity -->
|
||||
<string name="break_next">Next</string>
|
||||
<string name="exercise_summary">Your break will contain exercises for:</string>
|
||||
<string name="continuously">If checked, there will be no possibillity to skip the exercises</string>
|
||||
<string name="exercise_description">Make sure, to select some exercises! If nothing is selected, there will be no training in the breaks!</string>
|
||||
<!-- settings for ExerciseTypeActivity -->
|
||||
<string name="exercise_summary">Your break will contain exercises for the following body sections:</string>
|
||||
<string-array name="type_spinner">
|
||||
<item>Head</item>
|
||||
<item>Neck</item>
|
||||
<item>Arms</item>
|
||||
<item>Trunk</item>
|
||||
<item>Torso</item>
|
||||
<item>Spinal Column</item>
|
||||
<item>Pelvis</item>
|
||||
<item>Legs</item>
|
||||
|
|
@ -120,39 +102,42 @@
|
|||
<item>6</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
<!-- settings for BreakActivity -->
|
||||
<string name="_10_00" translatable="false">10:00</string>
|
||||
<string name="break_next">Next</string>
|
||||
<string name="break_description">Description:</string>
|
||||
<string name="break_explanation">Description of the Exercise</string>
|
||||
<string name="break_ex">Execution of the Exercise</string>
|
||||
<string name="break_execution">Execution:</string>
|
||||
<string name="exercise_type">Exercise Type</string>
|
||||
<string name="exercise_break">Break</string>
|
||||
<string name="exercise_side">Side</string>
|
||||
<string name="exercise_repetition">Repetition</string>
|
||||
|
||||
<!-- settings for HelpActivity -->
|
||||
<string name="help_start_screen">1. Spinner to select the used profile \n2. Clock shows time and is clickable. Can starts and stop the time. \n3. Button start and stops the time. \n4. Resets the time</string>
|
||||
<string name="help_start_screen">1. Spinner to select the profile \n2. Clock shows time and is clickable. Can starts and stop the time. \n3. Button start and stops the time. \n4. Resets the time</string>
|
||||
<string name="help_start_screen_title">Main Screen</string>
|
||||
<string name="help_settings_screen">1. Open the drawer and select \'Settings\' \n2. Select \'General\' to enter the profile settings. There you can change name, time and exercises of the profile. \n3. Select \'Notifications\' to activate or deactivate notifications. </string>
|
||||
<string name="help_settings_screen2">1. If selected it allows to vibrate, to use ringtones and message-notifications. If its disabled, non of the notifications will work.\n2. Select a ringtone. \n3. Choose if the mobile phone should vibrate, when the countdown ends. \n4. Choose if you want message notifications.\n5. If the flag is set the screen will stay on, while on main or exercise screen. </string>
|
||||
<string name="help_settings_screen2">1. Select a ringtone. \n2. Choose if the mobile phone should vibrate, when the countdown ends. \n3. Choose if you want message notifications.\n4. If the flag is set the screen will stay on, while on main screen.</string>
|
||||
<string name="help_settings_screen1">1. Choose the profile to change \n2. Enter the new name \n3. Alter the working time \n4. Alter the break time \n5. Choose if the \'Continuously\' flag is set or not. if it is, the break will start directly. if not, you can choose to take or to skip it. \n6. Choose the sections you want to train in the breaks. </string>
|
||||
<string name="help_settings_screen_title">Settings Screen</string>
|
||||
<string name="help_create_profile_screen">1. Choose the name of the profile \n2. Choose the time of your work-interval \n3. Choose the break-time of this profile \n4. Press on \'Select\', if you want to enter the exercise screen to select the training region of your profile. Ignore it, if you don\'t want to train on this profile. \n5. Check it if you want to take the break directly. Uncheck it, if you want to decide every time if you\'ll take the break. </string>
|
||||
<string name="help_create_profile_screen_title">Create New Profile Screen</string>
|
||||
<string name="help_break_screen_title">Break Screen</string>
|
||||
<string name="help_break_screen">PLACEHOLDER</string>
|
||||
<string name="help_break_screen">1. Body section for your current exercise. \n2. Clock shows remaining time for the break. If you click on it, it starts or stops.\n3. If it shows \'Break\', it means you have currently break between the exercises and you see the image for the next exercise. If it shows \'Side left or Side right\' then you have to perform the exercise as shown in the picture. If it shows \'Repetition\' then you just repeat current exercise.\n4. Explanation of how the exercise should be performed.\n5. Description of current exercise.</string>
|
||||
<string name="help_click_information">To see the images in real size simply click on them. To return back to this view re-click on the image!</string>
|
||||
<string name="side_repetition">Side/Repetition</string>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- settings for Disclaimer -->
|
||||
<string name="disclaimer">DISCLAIMER PLACEHOLDER</string>
|
||||
|
||||
|
||||
|
||||
<!-- settings for TutorialActivity -->
|
||||
<string name="tutorial_profiles">Select profiles</string>
|
||||
<string name="tutorial_reset_description">Press the button to reset the clock</string>
|
||||
<string name="tutorial_reset">Reset the clock</string>
|
||||
<string name="tutorial_clock_description">By pressing one of them, the clock starts or stops</string>
|
||||
<string name="tutorial_or">or</string>
|
||||
<string name="tutorial_profile_description">By clicking on the current profile (sport), you will see all the currently available profiles. \nYou can add new profiles by clicking on \'New Profiles...\' and edit the current ones in the settings</string>
|
||||
<string name="tutorial_profile_description">By clicking on the current profile (\'Random\'), you will see all the currently available profiles. \nYou can add new profiles by clicking on \'New Profiles...\' and edit the current ones in the settings</string>
|
||||
<string name="tutorial_clock">Start/Stop the clock</string>
|
||||
<string name="tutorial_description">Welcome to the Privacy Friendly Break Reminder</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder.DynamicListPreference
|
||||
android:defaultValue="@string/pref_current_profile"
|
||||
android:key="current_profile"
|
||||
android:title="@string/pref_current_profile"/>
|
||||
android:title="@string/pref_current_profile" />
|
||||
|
||||
<!-- NOTE: EditTextPreference accepts EditText attributes. -->
|
||||
<!-- NOTE: EditTextPreference's summary should be set to its value by the activity code. -->
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-"
|
||||
android:inputType="textCapWords"
|
||||
android:key="name_text"
|
||||
android:maxLength="10"
|
||||
android:maxLength="12"
|
||||
android:maxLines="1"
|
||||
android:selectAllOnFocus="true"
|
||||
android:singleLine="true"
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder.SeekBarPreference
|
||||
android:defaultValue="10"
|
||||
android:dialogMessage="@string/settings_break_dialog_message"
|
||||
android:dialogMessage="@string/settings_break_title"
|
||||
android:key="break_value"
|
||||
android:max="30"
|
||||
android:summary="@string/settings_break_summary"
|
||||
|
|
@ -43,14 +43,13 @@
|
|||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="cont_value"
|
||||
android:title="@string/pref_title_cont" />
|
||||
android:title="@string/new_profile_continuously" />
|
||||
|
||||
<orgprivacy_friendly_apps.secuso.privacyfriendlybreakreminder.ExerciseListPreference
|
||||
android:defaultValue="1"
|
||||
android:entryValues="@array/value_spinner"
|
||||
android:entries="@array/type_spinner"
|
||||
android:entryValues="@array/value_spinner"
|
||||
android:title="@string/pref_current_exercises" />
|
||||
|
||||
|
||||
</PreferenceScreen>
|
||||
<!--android:key="exercise"-->
|
||||
</PreferenceScreen><!--android:key="exercise"-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue