Commit 3c24358b authored by Weesinghe W.M.P.D's avatar Weesinghe W.M.P.D

Merge branch 'master' into 'IT20212018_Rewarding_System'

# Conflicts:
#   app/src/main/AndroidManifest.xml
parents f084e7d9 df2a8f82
*.iml *.iml
.gradle .gradle
/local.properties
/.idea/caches /.idea/caches
/.idea/libraries /.idea/libraries
/.idea/modules.xml /.idea/modules.xml
......
...@@ -65,4 +65,9 @@ dependencies { ...@@ -65,4 +65,9 @@ dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'org.tensorflow:tensorflow-android:1.13.1' implementation 'org.tensorflow:tensorflow-android:1.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.19'
} }
\ No newline at end of file
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.example.thetrek.R;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.Map;
public class PredictReward extends AppCompatActivity {
EditText Latitude, Longitude, Elevation;
Button predict;
TextView Reward;
String url = "https://trek-7f4725930ac3.herokuapp.com/predict";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.predict_reward);
Latitude = findViewById(R.id.latitude);
Longitude = findViewById(R.id.longitude);
Elevation = findViewById(R.id.elevation);
predict = findViewById(R.id.predict);
Reward = findViewById(R.id.reward);
predict.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// hit the API -> Volley
StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
JSONObject jsonObject = new JSONObject(response);
String data = jsonObject.getString("predict");
// switch (data) {
// case "0":
// Reward.setText("Reward level 0 can get!");
// break;
// case "1":
// Reward.setText("Reward level 1 can get!");
// break;
// case "2":
// Reward.setText("Reward level 2 can get!");
// break;
// case "3":
// Reward.setText("Reward level 3 can get!");
// break;
// case "4":
// Reward.setText("Reward level 4 can get!");
// break;
// case "5":
// Reward.setText("Reward level 5 can get!");
// break;
// default:
// Reward.setText("No any reward can get!");
// break;
// }
// } catch (JSONException e) {
// e.printStackTrace();
// }
//
// }
// },
if(data.equals("0")){
Reward.setText("Reward level 0 can get!");
}else if(data.equals("1")){
Reward.setText("Reward level 1 can get!");
}else if(data.equals("2")){
Reward.setText("Reward level 2 can get!");
}else if(data.equals("3")){
Reward.setText("Reward level 3 can get!");
}else if(data.equals("4")){
Reward.setText("Reward level 4 can get!");
}else if(data.equals("5")){
Reward.setText("Reward level 5 can get!");
}else{
Reward.setText("No any reward can get!");
}
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(PredictReward.this, error.getMessage(), Toast.LENGTH_SHORT).show();
}
}){
@Override
protected Map<String,String> getParams(){
Map<String,String> params = new HashMap<String,String>();
params.put("Latitude",Latitude.getText().toString());
params.put("Longitude",Longitude.getText().toString());
params.put("Elevation",Elevation.getText().toString());
return params;
}
};
RequestQueue queue = Volley.newRequestQueue(PredictReward.this);
queue.add(stringRequest);
}
});
}
}
...@@ -211,6 +211,53 @@ ...@@ -211,6 +211,53 @@
android:name="android.app.lib_name" android:name="android.app.lib_name"
android:value="" /> android:value="" />
</activity> </activity>
<activity
android:name=".activities.BackActivity"
android:exported="false" />
<activity
android:name=".activities.OutdoorActivity"
android:exported="false" />
<activity
android:name=".activities.WorkoutActivity"
android:exported="false" />
<activity
android:name=".activities.SportsActivity"
android:exported="false" />
<activity
android:name=".activities.DanceActivity"
android:exported="false" />
<activity
android:name=".activities.CoreActivity"
android:exported="false" />
<activity
android:name=".activities.LegActivity"
android:exported="false" />
<activity
android:name=".activities.EmailActivity"
android:exported="false" />
<activity
android:name=".activities.HeadActivity"
android:exported="false" />
<activity
android:name=".activities.DisplayActivity"
android:exported="false" />
<activity
android:name=".StopwatchActivity"
android:exported="false" />
<activity
android:name=".activities.CreateActivity"
android:exported="false" />
<activity
android:name=".activities.DetailActivity"
android:exported="false" />
<activity
android:name=".activities.LaunchActivity"
android:exported="false" />
<activity
android:name=".activities.ShowPeopleActivity"
android:exported="false"/>
<meta-data <meta-data
android:name="com.google.ar.core" android:name="com.google.ar.core"
android:value="required" /> android:value="required" />
...@@ -220,7 +267,7 @@ ...@@ -220,7 +267,7 @@
/> />
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAN5kiFNbLfInKmkge47ycTB01mcMG48IY" /> android:value="AIzaSyAynx5iCqfkqmUyUp3b2FNzf3OCm1dOrbU" />
</application>
</application>
</manifest> </manifest>
\ No newline at end of file
...@@ -9,6 +9,7 @@ import android.util.Log; ...@@ -9,6 +9,7 @@ import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
import com.example.thetrek.activities.ShowPeopleActivity;
import com.example.thetrek.db.LocationDAO; import com.example.thetrek.db.LocationDAO;
import com.example.thetrek.db.LocationsDbHelper; import com.example.thetrek.db.LocationsDbHelper;
import com.example.thetrek.db.RewardDbHelper; import com.example.thetrek.db.RewardDbHelper;
...@@ -51,7 +52,7 @@ public class HomeActivity extends AppCompatActivity { ...@@ -51,7 +52,7 @@ public class HomeActivity extends AppCompatActivity {
activityRecognitionButton.setOnClickListener(new View.OnClickListener() { activityRecognitionButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Intent intent = new Intent(v.getContext(), MainActivityRecognition.class); Intent intent = new Intent(v.getContext(), ShowPeopleActivity.class);
v.getContext().startActivity(intent); v.getContext().startActivity(intent);
} }
}); });
......
package com.example.thetrek;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import java.util.Locale;
public class StopwatchActivity extends AppCompatActivity {
private int seconds = 0;
private boolean running;
private boolean wasRunning;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stopwatch);
if (savedInstanceState != null) {
seconds
= savedInstanceState
.getInt("seconds");
running
= savedInstanceState
.getBoolean("running");
wasRunning
= savedInstanceState
.getBoolean("wasRunning");
}
runTimer();
}
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState
.putInt("seconds", seconds);
savedInstanceState
.putBoolean("running", running);
savedInstanceState
.putBoolean("wasRunning", wasRunning);
}
@Override
protected void onPause()
{
super.onPause();
wasRunning = running;
running = false;
}
@Override
protected void onResume()
{
super.onResume();
if (wasRunning) {
running = true;
}
}
public void onClickStart(View view)
{
running = true;
}
public void onClickStop(View view)
{
running = false;
}
public void onClickReset(View view)
{
running = false;
seconds = 0;
}
private void runTimer()
{
final TextView timeView
= (TextView)findViewById(
R.id.time_view);
final Handler handler
= new Handler();
handler.post(new Runnable() {
@Override
public void run()
{
int hours = seconds / 3600;
int minutes = (seconds % 3600) / 60;
int secs = seconds % 60;
String time
= String
.format(Locale.getDefault(),
"%d:%02d:%02d", hours,
minutes, secs);
timeView.setText(time);
if (running) {
seconds++;
}
handler.postDelayed(this, 1000);
}
});
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class BackActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_back);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class CoreActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_core);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Spinner;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.material.textfield.TextInputLayout;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import com.example.thetrek.R;
import com.example.thetrek.models.Person;
public class CreateActivity extends AppCompatActivity {
private Spinner gender;
private EditText dob, name, surname, weight;
private TextInputLayout dobContainer, nameContainer, surnameContainer, weightContainer;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_create);
gender = findViewById(R.id.gender);
dob = findViewById(R.id.dob);
name = findViewById(R.id.name);
surname = findViewById(R.id.surname);
weight = findViewById(R.id.weight);
dobContainer = findViewById(R.id.dob_container);
nameContainer = findViewById(R.id.name_container);
surnameContainer = findViewById(R.id.surname_container);
weightContainer = findViewById(R.id.weight_container);
List<String> genders = Arrays.asList(getResources().getStringArray(R.array.genders));
ArrayAdapter<String> genderAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, genders) {
@Override
public boolean isEnabled(int position) {
return position != 0;
}
};
genderAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
gender.setAdapter(genderAdapter);
findViewById(R.id.save).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
boolean validationFailed = false;
SimpleDateFormat sdf = new SimpleDateFormat("d-M-yyyy", Locale.getDefault());
Date date = null;
try {
date = sdf.parse(dob.getText().toString());
} catch (ParseException e) {
dobContainer.setError(getString(R.string.dob_error));
dobContainer.requestFocus();
validationFailed = true;
}
String weightStr = weight.getText().toString();
try {
int weightInt = Integer.parseInt(weightStr);
} catch (NumberFormatException e) {
weightContainer.setError(getString(R.string.weight_error));
weightContainer.requestFocus();
validationFailed = true;
}
String surnameStr = surname.getText().toString();
if (surnameStr.isEmpty()) {
surnameContainer.setError(getString(R.string.surname_error));
surnameContainer.requestFocus();
validationFailed = true;
}
String nameStr = name.getText().toString();
if (nameStr.isEmpty()) {
nameContainer.setError(getString(R.string.name_error));
nameContainer.requestFocus();
validationFailed = true;
}
if (validationFailed) {
return;
}
String genderStr;
if (gender.getSelectedItemPosition() == 0) {
genderStr = getString(R.string.gender_unknown);
}
else {
genderStr = gender.getSelectedItem().toString();
}
Person person = new Person(nameStr, surnameStr, genderStr, date, weightStr);
Intent intent = new Intent();
intent.putExtra("person", person.serialize());
setResult(RESULT_OK, intent);
finish();
}
});
name.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
nameContainer.setError(null);
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
@Override
public void afterTextChanged(Editable s) {}
});
surname.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
surnameContainer.setError(null);
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
@Override
public void afterTextChanged(Editable s) {}
});
dob.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
dobContainer.setError(null);
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
@Override
public void afterTextChanged(Editable s) {}
});
weight.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
weightContainer.setError(null);
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {}
@Override
public void afterTextChanged(Editable s) {}
});
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class DanceActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dance);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.MainActivityRecognition;
import com.google.gson.Gson;
import java.text.SimpleDateFormat;
import java.util.Locale;
import com.example.thetrek.R;
import com.example.thetrek.StopwatchActivity;
import com.example.thetrek.models.Person;
public class DetailActivity extends AppCompatActivity {
private static final int REQUEST_IMAGE_CAPTURE = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_detail);
Gson gson = new Gson();
Person person = gson.fromJson(getIntent().getStringExtra("person"), Person.class);
((TextView) findViewById(R.id.name)).setText(person.getName());
((TextView) findViewById(R.id.surname)).setText(person.getSurname().toUpperCase());
SimpleDateFormat sdf = new SimpleDateFormat("d-M-yyyy", Locale.getDefault());
String gender = person.getGender();
if(gender.isEmpty()) {
gender = getString(R.string.gender_unknown);
}
((TextView) findViewById(R.id.info)).setText(String.format(getString(R.string.info), gender, sdf.format(person.getDob())));
((TextView) findViewById(R.id.weight)).setText(String.format(getString(R.string.weight), person.getWeight()));
ImageView genderImage = findViewById(R.id.gender);
switch (person.getGender()) {
case "Male":
genderImage.setImageResource(R.drawable.male);
break;
case "Female":
genderImage.setImageResource(R.drawable.user);
break;
default:
genderImage.setImageResource(R.drawable.unknown);
}
findViewById(R.id.display_exercises).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, DisplayActivity.class);
startActivity(intent);
}
});
findViewById(R.id.stopwatch).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, StopwatchActivity.class);
startActivity(intent);
}
});
// Button picture = findViewById(R.id.progress_picture);
// picture.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v)
// {
// Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
// if (intent.resolveActivity(getPackageManager()) != null) {
// startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);
// }
// }
// });
findViewById(R.id.activityrecognise).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, MainActivityRecognition.class);
startActivity(intent);
}
});
findViewById(R.id.progress_picture).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, LaunchActivity.class);
startActivity(intent);
}
});
findViewById(R.id.email_self).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DetailActivity.this, EmailActivity.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class DisplayActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_display);
findViewById(R.id.head).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DisplayActivity.this, HeadActivity.class);
startActivity(intent);
}
});
findViewById(R.id.legs).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DisplayActivity. this, LegActivity.class);
startActivity(intent);
}
});
findViewById(R.id.back).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(DisplayActivity.this, BackActivity.class);
startActivity(intent);
}
});
findViewById(R.id.core).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(DisplayActivity. this, CoreActivity.class);
startActivity(intent);
}
});
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class EmailActivity extends AppCompatActivity {
private boolean success;
private EditText bodyEditText, subjectEditText;
private Button send;
private String addresses[] = new String[1];
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_email);
bodyEditText = findViewById(R.id.body);
subjectEditText = findViewById(R.id.subject);
send = findViewById(R.id.send);
CheckBox successBox = findViewById(R.id.email_self);
success = successBox.isChecked();
setSubject();
setBody();
((EditText) findViewById(R.id.to)).addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
addresses[0] = s.toString();
send.setEnabled(!addresses[0].equals(""));
}
@Override
public void afterTextChanged(Editable s) {}
});
successBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
success = isChecked;
setBody();
setSubject();
}
});
send.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.putExtra(Intent.EXTRA_EMAIL, addresses);
intent.putExtra(Intent.EXTRA_SUBJECT, subjectEditText.getText().toString());
intent.putExtra(Intent.EXTRA_TEXT, bodyEditText.getText().toString());
intent.setData(Uri.parse("mailto:"));
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
else {
Toast.makeText(EmailActivity.this, getString(R.string.no_mail), Toast.LENGTH_LONG).show();
}
}
});
}
private void setBody() {
String message;
if (success) {
bodyEditText.setText(String.format(getString(R.string.body_text)));
}
else {
bodyEditText.setText("");
}
}
private void setSubject() {
if (success) {
subjectEditText.setText(String.format(getString(R.string.subject_text)));
}
else {
subjectEditText.setText("");
}
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class HeadActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_head);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class LaunchActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_launch);
// ImageView yogi = findViewById(R.id.yogi);
// Button start = findViewById(R.id.get_started);
// start.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
//
// System.out.println("Before calling list intent");
//
// Intent intentlist = new Intent(LaunchActivity.this, ShowPeopleActivity.class);
// startActivity(intentlist);
// }
// });
// }
//}
findViewById(R.id.outdoor).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(LaunchActivity.this, OutdoorActivity.class);
startActivity(intent);
}
});
findViewById(R.id.dance).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(LaunchActivity.this, DanceActivity.class);
startActivity(intent);
}
});
findViewById(R.id.sports).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(LaunchActivity.this, SportsActivity.class);
startActivity(intent);
}
});
findViewById(R.id.workouts).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(LaunchActivity.this, WorkoutActivity.class);
startActivity(intent);
}
});
}
}
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class LegActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_leg);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class OutdoorActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_outdoor);
}
}
package com.example.thetrek.activities;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.google.gson.Gson;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.example.thetrek.R;
import com.example.thetrek.adapter.PeopleAdapter;
import com.example.thetrek.models.Person;
public class ShowPeopleActivity extends AppCompatActivity {
private static final int PERSON_CREATED = 1;
private List<Person> people;
private SharedPreferences database;
private Gson gson;
private TextView noUsers;
private ListView users;
private PeopleAdapter peopleAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
System.out.println("im before super call");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_show_people);
noUsers = findViewById(R.id.no_users);
users = findViewById(R.id.users_list);
people = new ArrayList<>();
database = getSharedPreferences("database", MODE_PRIVATE);
gson = new Gson();
String json = database.getString("people", "");
if (!json.isEmpty()) {
System.out.println("json isnt empty");
people = new ArrayList<>(Arrays.asList(gson.fromJson(json, Person[].class)));
users.setVisibility(View.VISIBLE);
noUsers.setVisibility(View.INVISIBLE);
}
else {
System.out.println("Json is empty.");
users.setVisibility(View.INVISIBLE);
noUsers.setVisibility(View.VISIBLE);
}
peopleAdapter = new PeopleAdapter(this, people);
System.out.println("at people adapter");
users.setAdapter(peopleAdapter);
users.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
people.remove(position);
System.out.println("in item long click");
saveAndUpdate();
return false;
}
});
System.out.println("before users ");
users.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Person person = (Person) parent.getAdapter().getItem(position);
Intent intent = new Intent(ShowPeopleActivity.this, DetailActivity.class);
intent.putExtra("person", person.serialize());
startActivity(intent);
}
});
System.out.println("before add ");
findViewById(R.id.add).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivityForResult(new Intent(ShowPeopleActivity.this, CreateActivity.class), PERSON_CREATED);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode != PERSON_CREATED || resultCode != RESULT_OK || data == null) {
return;
}
System.out.println("in activity result");
String json = data.getStringExtra("person");
Person person = gson.fromJson(json, Person.class);
people.add(person);
saveAndUpdate();
}
private void saveAndUpdate() {
System.out.println("in save and update");
SharedPreferences.Editor editor = database.edit();
editor.putString("people", gson.toJson(people));
editor.apply();
if (people.size() == 1 && users.getVisibility() == View.INVISIBLE) {
users.setVisibility(View.VISIBLE);
noUsers.setVisibility(View.INVISIBLE);
}
else if (people.size() == 0 && users.getVisibility() == View.VISIBLE) {
users.setVisibility(View.INVISIBLE);
noUsers.setVisibility(View.VISIBLE);
}
peopleAdapter.notifyDataSetChanged();
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class SportsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sports);
}
}
\ No newline at end of file
package com.example.thetrek.activities;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import com.example.thetrek.R;
public class WorkoutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_workout);
}
}
\ No newline at end of file
package com.example.thetrek.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import java.util.List;
import com.example.thetrek.R;
import com.example.thetrek.models.Person;
public class PeopleAdapter extends BaseAdapter {
private Context context;
private List<Person> people;
public PeopleAdapter(Context context, List<Person> people) {
this.context = context;
this.people = people;
}
@Override
public int getCount() {
return people.size();
}
@Override
public Object getItem(int position) {
return people.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater inflater = LayoutInflater.from(context);
convertView = inflater.inflate(R.layout.person_adapter_layout, parent, false);
}
Person person = (Person) getItem(position);
((TextView) convertView.findViewById(R.id.name)).setText(person.getName());
((TextView) convertView.findViewById(R.id.surname)).setText(person.getSurname());
ImageView gender = convertView.findViewById(R.id.gender);
switch (person.getGender()) {
case "Male":
gender.setImageResource(R.drawable.male);
break;
case "Female":
gender.setImageResource(R.drawable.user);
break;
default:
gender.setImageResource(R.drawable.unknown);
}
return convertView;
}
}
package com.example.thetrek.models;
import com.google.gson.Gson;
import java.util.Date;
public class Person {
private String name;
private String surname;
private String gender;
private Date dob;
private String weight;
public Person(String name, String surname, String gender, Date dob, String weight) {
this.name = name;
this.surname = surname;
this.gender = gender;
this.dob = dob;
this.weight = weight;
}
public String getName() {
return name;
}
public String getSurname() {
return surname;
}
public String getGender() {
return gender;
}
public Date getDob() {
return dob;
}
public String getWeight() {
return weight;
}
public String serialize(){
Gson gson = new Gson();
return gson.toJson(this);
}
}
\ No newline at end of file
...@@ -12,6 +12,7 @@ import android.widget.Toast; ...@@ -12,6 +12,7 @@ import android.widget.Toast;
import com.example.thetrek.PredictReward; import com.example.thetrek.PredictReward;
import com.example.thetrek.R; import com.example.thetrek.R;
import com.example.thetrek.db.LocationDAO; import com.example.thetrek.db.LocationDAO;
import com.example.thetrek.screens.findPlaces.FindPlacesActivity;
public class AddLocations extends AppCompatActivity { public class AddLocations extends AppCompatActivity {
private EditText editTextLatitude; private EditText editTextLatitude;
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.BackActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/get_ready_to_strengthen_your_back"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="23sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:text="@string/CatCow"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="23sp" />
<pl.droidsonroids.gif.GifImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/back1" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:text="@string/catcowdes"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="@string/dwfdog"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/dwfdog"
/>
<pl.droidsonroids.gif.GifImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/back2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:text="@string/dwfdogdesc"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="@string/extriangle"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/extTriangle"
/>
<pl.droidsonroids.gif.GifImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/back3" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:text="@string/extTriangleDesc"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="Two-Knee Spinal Twist"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/kneetwist"
/>
<pl.droidsonroids.gif.GifImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/back4" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:text="@string/twokneetwistdesc"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp"
tools:context=".activities.CoreActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/core_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/introtocore"
android:textStyle="bold"
android:textSize="23sp"
android:textColor="@color/black"/>
<TextView
android:id="@+id/boat_pose"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="Boat Pose"
android:layout_marginTop="20sp"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/boat_pose"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textColor="@color/black"
android:textSize="12sp"
android:text="Breathing right is key for this pose. Remember to flex both the core and the legs for this exercise. Maximum time should be 1 minute. Stay in this pose for at most 10–20 breaths and repeat no more than 4 times.(sets)" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="Doplhin Plank Pose"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/dolphin_plank_pose"
/>
<androidx.constraintlayout.utils.widget.ImageFilterView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/dolphinplank"
android:id="@+id/dolphin_plank_pic"
android:adjustViewBounds="true"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textColor="@color/black"
android:textSize="12sp"
android:text="@string/dolphin_text"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="@string/vwpose"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/victorious_warrior"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/warrior_pose"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textColor="@color/black"
android:textSize="12sp"
android:text="@string/warriortext"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40sp"
android:text="Bridge Pose"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="18sp"
android:id="@+id/bridgepose"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bridgepose"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textColor="@color/black"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:text="@string/Bridgetext" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:padding="16dp"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".activities.CreateActivity">
<TextView
android:id="@+id/profile_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/profile_info"
android:textSize="20sp"
android:textColor="@color/black"
android:textStyle="bold"
android:paddingBottom="12dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"/>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/name_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/profile_info"
app:layout_constraintStart_toStartOf="parent"
app:errorEnabled="true"
android:hint="@string/name">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/name"
android:inputType="textPersonName"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/surname_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/name_container"
app:layout_constraintStart_toStartOf="parent"
app:errorEnabled="true"
android:hint="@string/surname">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/surname"
android:inputType="textPersonName"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/dob_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/surname_container"
app:layout_constraintStart_toStartOf="parent"
app:errorEnabled="true"
android:hint="@string/date_of_birth">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dob"
android:inputType="date"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</com.google.android.material.textfield.TextInputLayout>
<Spinner
android:id="@+id/gender"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingTop="25dp"
android:paddingBottom="25dp"
app:layout_constraintTop_toBottomOf="@id/dob_container"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/weight_label"
style="@android:style/TextAppearance.Widget.TextView.SpinnerItem"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginTop="12dp"
android:gravity="center"
android:paddingTop="12dp"
android:paddingEnd="12dp"
android:paddingBottom="12dp"
android:paddingLeft="50dp"
android:text="@string/weight_label"
android:textColor="@color/white"
android:textSize="20sp"
app:layout_constraintEnd_toStartOf="@id/weight_container"
app:layout_constraintTop_toBottomOf="@id/gender" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/weight_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingTop="12dp"
app:layout_constraintStart_toEndOf="@id/weight_label"
app:layout_constraintTop_toTopOf="@id/weight_label"
app:layout_constraintBottom_toBottomOf="@id/weight_label"
app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_percent=".5"
android:hint="@string/kg">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/weight"
android:maxLines="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="number"/>
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/save"
android:layout_width="match_parent"
android:layout_height="65dp"
android:backgroundTint="#5D71C9"
android:text="@string/save"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/weight_label" />
</androidx.constraintlayout.widget.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.DanceActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Dance and Movement Arts"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Hula Hooping"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/hulahooping" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/hulahooping" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Circus Arts"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/circus" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/circus" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Capoeira"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/capoeira" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/capoeira" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Aerial Silks"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/aerialsilks" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/aeriText" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Synchronized Swimming"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/swiming" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/swiming" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:background="@drawable/background"
tools:context=".activities.DetailActivity">
<ImageView
android:id="@+id/gender"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginTop="30dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textColor="@color/black"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/gender"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/surname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="36sp"
android:textStyle="bold"
android:textColor="@color/black"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textStyle="bold"
android:textColor="@color/black"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/surname"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/weight"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@color/black"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/info"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/display_exercises"
android:layout_width="match_parent"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:text="Display Yoga Poses"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/weight"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/stopwatch"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:text="Stop Watch"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/display_exercises"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/activityrecognise"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/activityrecognise"
android:layout_width="0dp"
android:layout_height="65dp"
android:layout_marginTop="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="Activity Recognition"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@id/display_exercises"
app:layout_constraintStart_toEndOf="@id/stopwatch"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/progress_picture"
android:layout_width="0dp"
android:layout_height="65dp"
android:text="Physical Activity"
android:textSize="12sp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/email_self"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/email_self"
android:layout_width="0dp"
android:layout_height="65dp"
android:text="@string/send_email_to_self"
android:textSize="12sp"
android:layout_marginTop="16dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:layout_constraintTop_toBottomOf="@id/stopwatch"
app:layout_constraintStart_toEndOf="@id/progress_picture"
app:layout_constraintEnd_toEndOf="parent"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
android:background="@drawable/model1"
tools:context=".activities.DisplayActivity">
<TextView
android:id="@+id/selection"
android:layout_width="wrap_content"
android:paddingTop = "1dp"
android:layout_height="wrap_content"
android:text="Select what to train"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="20sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
<Button
android:id="@+id/head"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/mind"
android:backgroundTint="#5D71C9"
android:layout_marginTop="80dp"
android:layout_marginStart="50dp"
app:layout_constraintTop_toBottomOf="@id/selection"
app:layout_constraintStart_toStartOf="parent"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/back"
android:layout_gravity="center"
android:text="Back"
android:backgroundTint="#5D71C9"
android:layout_marginTop="120dp"
android:layout_marginEnd="35dp"
app:layout_constraintTop_toBottomOf="@+id/selection"
app:layout_constraintEnd_toEndOf="parent"/>
<Button
android:id="@+id/core"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/abdominal"
android:backgroundTint="#5D71C9"
android:layout_marginTop="250dp"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection"
app:layout_constraintEnd_toEndOf="parent"
/>
<Button
android:id="@+id/legs"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/legs"
android:backgroundTint="#5D71C9"
android:layout_marginTop="450dp"
android:layout_marginEnd="40dp"
app:layout_constraintTop_toBottomOf="@id/selection"
app:layout_constraintEnd_toEndOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context=".activities.EmailActivity">
<CheckBox
android:id="@+id/email_self"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="10dp"
android:text="@string/email_yourself"
android:checked="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/to_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/email_self"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:hint="@string/to" >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/to"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/subject_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/to_container"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:hint="@string/subject" >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/subject"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailSubject"/>
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/body_container"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/subject_container"
app:layout_constraintBottom_toTopOf="@id/send"
android:paddingBottom="4dp"
android:hint="@string/email_body" >
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/body"
android:gravity="top|start"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="textCapSentences|textAutoCorrect|textMultiLine"/>
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="@string/send"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.HeadActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/mindtext"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="@string/cross_legged_position"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/meditatecross" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/medtext" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="@string/kneeling_pose"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/kneel" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/kneelText" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/chair_position" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/chair" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/textChair" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.LaunchActivity"
android:background="@drawable/background">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Craft Your Active Adventure"
android:textSize="24dp"
android:textAlignment="center"
android:layout_marginTop="10dp"
android:textStyle="bold"
android:textColor="@color/cardview_dark_background"></TextView>
<Button
android:id="@+id/outdoor"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="100dp"
android:text="Adventure and Outdoor Activities"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/sports"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Unique Sports and Games"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="300dp"
android:backgroundTint="#5D71C9" />
<Button
android:id="@+id/dance"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Dance and Movement Arts"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="200dp"
android:backgroundTint="#5D71C9"/>
<Button
android:id="@+id/workouts"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:text="Alternative Fitness Workouts"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="400dp"
android:backgroundTint="#5D71C9"/>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.LegActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/core_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/introtolegs"
android:textStyle="bold"
android:textSize="23sp"
android:textColor="@color/black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"
android:text="@string/DownDog"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/downwarddog"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/dogstring"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="@string/triangle_pose"
android:textStyle="bold"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/trianglepose"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/Tposestring"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Bridge Variation Pose"
android:textStyle="bold" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bridgevar"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="12sp"
android:layout_marginTop="10sp"
android:text="@string/BridgevarText"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Half Moon Pose"
android:textStyle="bold" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/halfmoon"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:layout_marginTop="10sp"
android:text="@string/Halfmoontext"
/>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.OutdoorActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/outdoor1"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Parkour"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/parkout" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/outdoor2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Geocaching"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/geocaching" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/geoText" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Rock Climbing"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/rockclimbing" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/textRock" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Disc Golf"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/discgolf" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/textDisk" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Hiking"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/hiking" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/hiking" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context=".activities.ShowPeopleActivity"
android:background="@drawable/background">
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="78dp"
android:text="@string/users"
android:gravity="center"
android:autoSizeTextType="uniform"
android:textColor="@color/black"
android:textStyle="bold"
android:maxLines="1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"/>
<TextView
android:id="@+id/no_users"
android:layout_width="match_parent"
android:layout_height="0dp"
android:text="@string/add_your_first_user"
android:gravity="center"
android:autoSizeTextType="uniform"
android:textColor="@color/black"
android:maxLines="1"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintBottom_toTopOf="@id/add"
app:layout_constraintStart_toStartOf="parent" />
<ListView
android:id="@+id/users_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintBottom_toTopOf="@id/add"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:backgroundTint="#5D71C9"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.SportsActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Unique Sports and Games"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Pickleball"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/pickleball" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/pickleball" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Ultimate Frisbee"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/ultimatefrisbee" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/ultimatefrisbee" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Trampoline Dodgeball"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/trampolinedodgeball" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/trampolinedodgeball" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Frisbee Golf (Frolf)"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/frolf" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/frolf" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context=".StopwatchActivity">
<TextView
android:id="@+id/time_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@android:style/TextAppearance.Large"
android:textSize="56sp"
android:layout_marginTop="16dp"
android:layout_marginBottom="150dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
<Button
android:id="@+id/start_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:onClick="onClickStart"
android:text="@string/start"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/stop_button"
app:layout_constraintTop_toBottomOf="@id/time_view" />
<Button
android:id="@+id/stop_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="onClickStop"
android:text="@string/stop"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toEndOf="@id/start_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/time_view" />
<Button
android:id="@+id/reset_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:onClick="onClickReset"
android:text="@string/reset"
android:backgroundTint="#5D71C9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/start_button" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context=".SuggestActivity" tools:context=".SuggestActivity"
android:background="@drawable/background"
android:orientation="vertical"> android:orientation="vertical">
<TextView <TextView
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
<Button <Button
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="65dp" android:layout_height="65dp"
android:text="Predict" android:text="Click For Predict"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:textStyle="bold" android:textStyle="bold"
android:id="@+id/predict" android:id="@+id/predict"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".activities.WorkoutActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/head_section"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Alternative Fitness Workouts"
android:textSize="23sp"
android:textColor="@color/black"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Cardio Drumming"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/cardiodrumming" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/cardiodrumming" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Aqua Aerobics"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/aqua" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:textColor="@color/black"
android:text="@string/aqua" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Pound Fit"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/poundfit" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/poundfit" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20sp"
android:textSize="23sp"
android:textColor="@color/black"
android:text="Bungee Fitness"
android:textStyle="bold"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/bungeefitness" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="7sp"
android:textSize="12sp"
android:layout_marginBottom="15dp"
android:textColor="@color/black"
android:text="@string/bungeefitness" />
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/gender"
android:layout_width="75dp"
android:layout_height="75dp"
android:paddingEnd="8dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:src="@drawable/user"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:text="Marian"
app:layout_constraintTop_toTopOf="@id/gender"
app:layout_constraintStart_toEndOf="@id/gender" />
<TextView
android:id="@+id/surname"
android:layout_width="0dp"
android:layout_height="0dp"
android:autoSizeTextType="uniform"
android:maxLines="1"
android:text="Pentagon"
android:paddingBottom="8dp"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintBottom_toBottomOf="@id/gender"
app:layout_constraintStart_toEndOf="@id/gender"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment