Skip to content
Snippets Groups Projects
Commit 243f7695 authored by ect1u17's avatar ect1u17
Browse files

Change to v0.0.2

parent f58c0d8b
Branches
No related tags found
No related merge requests found
Showing
with 471 additions and 134 deletions
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
...@@ -34,12 +33,22 @@ ...@@ -34,12 +33,22 @@
<activity <activity
android:name=".BoxesActivity" android:name=".BoxesActivity"
android:label="Experiments" android:label="Boxes"
android:theme="@style/AppTheme.NoActionBar"/> android:theme="@style/AppTheme.NoActionBar"/>
<activity <activity
android:name=".ExperimentsListActivity" android:name=".ExperimentsListActivity"
android:label="Experiment to be named from code" android:label="Experiment"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".ShopActivity"
android:label="Shop"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".ProgressActivity"
android:label="Progress"
android:theme="@style/AppTheme.NoActionBar"/> android:theme="@style/AppTheme.NoActionBar"/>
</application> </application>
......
package com.yearthreeproject.xbframework; package com.yearthreeproject.xbframework;
import android.app.ActionBar;
import android.content.Intent; import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
...@@ -27,7 +32,21 @@ public class BoxesActivity extends AppCompatActivity { ...@@ -27,7 +32,21 @@ public class BoxesActivity extends AppCompatActivity {
private Toolbar myToolbar; private Toolbar myToolbar;
private Button backHome; private Button backHome;
private JSONObject temp;
@Override
public boolean onCreateOptionsMenu(Menu menu){
MenuItem item = menu.add("Testing");
item.setTitle("Testing!");
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
// do stuff
d("Menu", (String) item.getTitle());
return false;
}
});
return true;
}
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
...@@ -38,10 +57,12 @@ public class BoxesActivity extends AppCompatActivity { ...@@ -38,10 +57,12 @@ public class BoxesActivity extends AppCompatActivity {
setSupportActionBar(myToolbar); setSupportActionBar(myToolbar);
LinearLayout grid = findViewById(R.id.experimentsGrid); LinearLayout grid = findViewById(R.id.experimentsGrid);
// JSON loading from local directory, could be implemented to stream from online // JSON loading from local directory, could be implemented to stream from online
InputStream inputStream = getResources().openRawResource(R.raw.box); InputStream inputStream = getResources().openRawResource(R.raw.box);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
JSONObject boxes; final JSONArray MEECS;
int ctr; int ctr;
// Try, in order to avoid errors in compilation and catastrophic errors // Try, in order to avoid errors in compilation and catastrophic errors
...@@ -55,46 +76,68 @@ public class BoxesActivity extends AppCompatActivity { ...@@ -55,46 +76,68 @@ public class BoxesActivity extends AppCompatActivity {
inputStream.close(); inputStream.close();
// Full loading of json array with each data item included // Full loading of json array with each data item included
boxes = new JSONObject(byteArrayOutputStream.toString()); MEECS = new JSONArray(byteArrayOutputStream.toString());
final JSONArray boxJson = boxes.getJSONArray("Boxes");
LinearLayout[] layoutHolder = new LinearLayout[boxJson.length()]; LinearLayout[] meecsHolder = new LinearLayout[5];
for(int i = 0; i < boxJson.length(); i++){ LinearLayout[] layoutHolder = new LinearLayout[MEECS.length()];
layoutHolder[i] = new LinearLayout(this);
layoutHolder[i].setOrientation(LinearLayout.HORIZONTAL);
layoutHolder[i].setPadding(0, 0, 0, 16);
ImageView iV = new ImageView(this); for(int i = 0; i < MEECS.length(); i++){
iV.setImageResource(R.mipmap.ic_launcher); final JSONArray boxes = MEECS.getJSONObject(i).getJSONArray("Box");
meecsHolder[i] = new LinearLayout(this);
TextView groupTitle = new TextView(this);
groupTitle.setText(MEECS.getJSONObject(i).getString("Group"));
groupTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP, 36);
groupTitle.setPadding(0,8,0,0);
meecsHolder[i].setOrientation(LinearLayout.VERTICAL);
meecsHolder[i].addView(groupTitle);
View hr = new View(this);
ViewGroup.LayoutParams tempLayout = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 4);
hr.setLayoutParams(tempLayout);
hr.setBackgroundColor(Color.parseColor("#888888"));
meecsHolder[i].addView(hr);
for(int j = 0; j < boxes.length(); j++){
layoutHolder[j] = new LinearLayout(this);
layoutHolder[j].setOrientation(LinearLayout.HORIZONTAL);
layoutHolder[j].setPadding(0, 8, 0, 8);
LinearLayout textBox = new LinearLayout(this); LinearLayout textBox = new LinearLayout(this);
textBox.setOrientation(LinearLayout.VERTICAL); textBox.setOrientation(LinearLayout.VERTICAL);
textBox.setPadding(16, 0, 0, 0);
TextView titleOfItem = new TextView(this); TextView titleOfItem = new TextView(this);
titleOfItem.setText(boxJson.getJSONObject(i).getString("Name")); titleOfItem.setText(boxes.getJSONObject(j).getString("Name"));
titleOfItem.setTextSize(TypedValue.COMPLEX_UNIT_SP,28); titleOfItem.setTextSize(TypedValue.COMPLEX_UNIT_SP,28);
TextView descOfItem = new TextView(this); TextView descOfItem = new TextView(this);
descOfItem.setText(boxJson.getJSONObject(i).getString("Locked"));
descOfItem.setText(boxes.getJSONObject(j).getString("Locked"));
textBox.addView(titleOfItem); textBox.addView(titleOfItem);
textBox.addView(descOfItem); textBox.addView(descOfItem);
layoutHolder[i].addView(iV); ImageView iV;
layoutHolder[i].addView(textBox); if(!boxes.getJSONObject(j).getString("Image").equals("null")) {
iV = new ImageView(this);
iV.setImageResource(R.mipmap.ic_launcher);
layoutHolder[j].addView(iV);
}
layoutHolder[j].addView(textBox);
layoutHolder[i].setId(i); layoutHolder[j].setId(j);
layoutHolder[i].setOnClickListener(new View.OnClickListener() { layoutHolder[j].setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
try{ try{
boolean locked = boxJson.getJSONObject(v.getId()).getBoolean("Locked"); boolean locked = boxes.getJSONObject(v.getId()).getBoolean("Locked");
if(!locked) { if(!locked) {
String text = boxJson.getJSONObject(v.getId()).getString("Name");
//d("test", text);
Intent openPage = new Intent(BoxesActivity.this, ExperimentsListActivity.class); Intent openPage = new Intent(BoxesActivity.this, ExperimentsListActivity.class);
openPage.putExtra("JSON", boxJson.getJSONObject(v.getId()).toString()); openPage.putExtra("JSON", boxes.getJSONObject(v.getId()).toString());
startActivity(openPage); startActivity(openPage);
finish(); finish();
} }
...@@ -103,10 +146,10 @@ public class BoxesActivity extends AppCompatActivity { ...@@ -103,10 +146,10 @@ public class BoxesActivity extends AppCompatActivity {
} }
} }
}); });
meecsHolder[i].addView(layoutHolder[j]);
grid.addView(layoutHolder[i]); }
grid.addView(meecsHolder[i]);
} }
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
......
package com.yearthreeproject.xbframework; package com.yearthreeproject.xbframework;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.w3c.dom.Text;
import java.util.ArrayList;
import java.util.Objects;
import static android.util.Log.d;
public class ExperimentsListActivity extends AppCompatActivity { public class ExperimentsListActivity extends AppCompatActivity {
private Toolbar myToolbar; private Toolbar myToolbar;
private Button backHome; private Button backHome;
private Button submit;
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_boxes); setContentView(R.layout.activity_experiments_list);
myToolbar = findViewById(R.id.toolbar); myToolbar = findViewById(R.id.toolbar);
setSupportActionBar(myToolbar); setSupportActionBar(myToolbar);
d("Launched", "Experiments");
LinearLayout linLayout = findViewById(R.id.experimentLayout);
try { try {
JSONObject jsonObj = new JSONObject(getIntent().getStringExtra("JSON")); JSONObject jsonObj = new JSONObject(getIntent().getStringExtra("JSON"));
setTitle(jsonObj.getString("Name")); setTitle(jsonObj.getString("Name"));
/* Description | TextView
* Warning | TextView (Red)
* Experiment Group Name | TextView
* Hr
* Button choice between experiments in group
* Repeat from experiment group name
*/
TextView description = new TextView(this);
TextView warning = new TextView(this);
description.setText(jsonObj.getString("Description"));
warning.setText(jsonObj.getString("WarningText"));
warning.setTextColor(Color.parseColor("#f00808"));
linLayout.addView(description);
linLayout.addView(warning);
JSONArray experimentsList = jsonObj.getJSONArray("Experiments");
final ArrayList<RadioButton> rbArray = new ArrayList<RadioButton>();
int uniqueId = 0;
for( int i = 0; i < experimentsList.length(); i++){
View hr = new View(this);
ViewGroup.LayoutParams tempLayout = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 4);
hr.setLayoutParams(tempLayout);
hr.setBackgroundColor(Color.parseColor("#888888"));
hr.setPadding(0,0,0,16);
TextView experimentGroupName = new TextView(this);
experimentGroupName.setText(experimentsList.getJSONObject(i).getString("Group"));
experimentGroupName.setPadding(0,8,0,8);
linLayout.addView(hr);
linLayout.addView(experimentGroupName);
JSONArray experimentOptions = experimentsList.getJSONObject(i).getJSONArray("Options");
for( int j = 0; j < experimentOptions.length(); j++){
RadioButton rB = new RadioButton(this);
rB.setId(uniqueId);
rB.setText(experimentOptions.getString(j));
rB.setOnClickListener(new View.OnClickListener(){
public void onClick(View v) {
for(int x = 0; x < rbArray.size(); x++){
if(x != v.getId()) rbArray.get(x).setChecked(false);
else rbArray.get(x).setChecked(true);
}
}
});
uniqueId += 1;
rbArray.add(rB);
linLayout.addView(rB);
}
}
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); e.printStackTrace();
} }
submit = findViewById(R.id.experimentSubmit);
submit.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
d("Button", "Submit!");
}
});
backHome=findViewById(R.id.experimentsBackHome); backHome=findViewById(R.id.experimentsBackHome);
backHome.setOnClickListener(new View.OnClickListener(){ backHome.setOnClickListener(new View.OnClickListener(){
......
...@@ -63,7 +63,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -63,7 +63,7 @@ public class MainActivity extends AppCompatActivity {
shopButton=findViewById(R.id.shopButton); shopButton=findViewById(R.id.shopButton);
shopButton.setOnClickListener(new View.OnClickListener(){ shopButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v) { public void onClick(View v) {
d("testing", "shopButton clicked"); startActivity(new Intent(MainActivity.this, ShopActivity.class ));
} }
}); });
...@@ -77,7 +77,7 @@ public class MainActivity extends AppCompatActivity { ...@@ -77,7 +77,7 @@ public class MainActivity extends AppCompatActivity {
progressButton=findViewById(R.id.progressButton); progressButton=findViewById(R.id.progressButton);
progressButton.setOnClickListener(new View.OnClickListener(){ progressButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v) { public void onClick(View v) {
d("testing", "progressButton clicked"); startActivity(new Intent(MainActivity.this, ProgressActivity.class));
} }
}); });
......
package com.yearthreeproject.xbframework;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class ProgressActivity extends AppCompatActivity {
private Toolbar myToolbar;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shop);
myToolbar = findViewById(R.id.toolbar);
setSupportActionBar(myToolbar);
}
}
package com.yearthreeproject.xbframework;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
public class ShopActivity extends AppCompatActivity {
private Toolbar myToolbar;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_shop);
myToolbar = findViewById(R.id.toolbar);
setSupportActionBar(myToolbar);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
tools:context=".ProgressActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:minHeight="56dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_progress" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
tools:context=".ShopActivity">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:minHeight="56dp"
android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_shop" />
</LinearLayout>
\ No newline at end of file
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<TextView <TextView
android:id="@+id/aboutParagraph" android:id="@+id/aboutParagraph"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="0dp"
android:layout_weight="1"
android:text="@string/about_about_para" android:text="@string/about_about_para"
android:textSize="22sp" /> android:textSize="22sp" />
......
...@@ -30,4 +30,5 @@ ...@@ -30,4 +30,5 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/about_back_home_button" /> android:text="@string/about_back_home_button" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -12,28 +12,32 @@ ...@@ -12,28 +12,32 @@
tools:context=".ExperimentsListActivity" tools:context=".ExperimentsListActivity"
tools:showIn="@layout/activity_experiments_list"> tools:showIn="@layout/activity_experiments_list">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<Button <LinearLayout
android:id="@+id/button" android:id="@+id/experimentLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Button" /> android:orientation="vertical">
</LinearLayout>
</ScrollView>
<TextView <Button
android:id="@+id/textView" android:id="@+id/experimentSubmit"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="TextView" /> android:layout_weight="0"
android:text="@string/experiment_submit" />
<View <Button
android:layout_width="fill_parent" android:id="@+id/experimentsBackHome"
android:layout_height="1dp"
android:background="#7C7C7C" />
<TextView
android:id="@+id/textView2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="TextView" /> android:layout_weight="0"
android:text="@string/about_back_home_button" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
tools:showIn="@layout/activity_login"> tools:showIn="@layout/activity_login">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -30,8 +36,8 @@ ...@@ -30,8 +36,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:ems="10" android:ems="10"
android:inputType="textEmailAddress" android:hint="@string/login_email_hint"
android:hint="@string/login_email_hint" /> android:inputType="textEmailAddress" />
</LinearLayout> </LinearLayout>
...@@ -53,8 +59,8 @@ ...@@ -53,8 +59,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:ems="10" android:ems="10"
android:inputType="textPassword" android:hint="@string/login_password_hint"
android:hint="@string/login_password_hint"/> android:inputType="textPassword" />
</LinearLayout> </LinearLayout>
...@@ -63,6 +69,7 @@ ...@@ -63,6 +69,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/login_login_button" /> android:text="@string/login_login_button" />
</LinearLayout>
<Button <Button
android:id="@+id/backHomeLogin" android:id="@+id/backHomeLogin"
......
...@@ -15,35 +15,41 @@ ...@@ -15,35 +15,41 @@
android:id="@+id/homeButton" android:id="@+id/homeButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_home" /> android:text="@string/main_home" />
<Button <Button
android:id="@+id/loginButton" android:id="@+id/loginButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_login" /> android:text="@string/main_login" />
<Button <Button
android:id="@+id/shopButton" android:id="@+id/shopButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_shop" /> android:text="@string/main_shop" />
<Button <Button
android:id="@+id/experimentsButton" android:id="@+id/experimentsButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_experiments" /> android:text="@string/main_experiments" />
<Button <Button
android:id="@+id/progressButton" android:id="@+id/progressButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_progress" /> android:text="@string/main_progress" />
<Button <Button
android:id="@+id/aboutButton" android:id="@+id/aboutButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/main_about" /> android:text="@string/main_about" />
</LinearLayout> </LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_margin="16dp"
android:layout_marginTop="32dp"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".ProgressActivity"
tools:showIn="@layout/activity_progress">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
<Button
android:id="@+id/backHomeProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_back_home_button" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:layout_margin="16dp"
android:layout_marginTop="32dp"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context=".ShopActivity"
tools:showIn="@layout/activity_shop">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
</LinearLayout>
<Button
android:id="@+id/backHomeProgress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_back_home_button" />
</LinearLayout>
\ No newline at end of file
{ [{
"Boxes": [{
"Name": "Move Box",
"Group": "Move", "Group": "Move",
"Box": [{
"Name": "Move Box",
"Locked": true, "Locked": true,
"Box": [null] "Image": null,
"Experiments": [null]
}]
},{ },{
"Name": "Eat Box",
"Group": "Eat", "Group": "Eat",
"Box": [{
"Name": "Eat Box 1",
"Locked": true, "Locked": true,
"Box": [null] "Image": null,
"Experiments": [null]
},{
"Name": "Eat Box 2",
"Locked": true,
"Image": null,
"Experiments": [null]
}]
},{ },{
"Name": "Engage Box",
"Group": "Engage", "Group": "Engage",
"Box": [{
"Name": "Engage Box",
"Locked": true, "Locked": true,
"Box": [null] "Image": null,
"Experiments": [null]
}]
},{ },{
"Name": "Cogitate Box",
"Group": "Cogitate", "Group": "Cogitate",
"Box": [{
"Name": "Cogitate Box",
"Locked": true, "Locked": true,
"Box": [null] "Image": null,
"Experiments": [null]
}]
},{ },{
"Name": "XBSleepBox",
"Group": "Sleep", "Group": "Sleep",
"Box": [{
"Name": "SleepBetter",
"Locked": false, "Locked": false,
"Image": null,
"Description": "These are the next factors and associated experiments that impact your sleep hygiene. The chosen experiment is the one you chose to follow.", "Description": "These are the next factors and associated experiments that impact your sleep hygiene. The chosen experiment is the one you chose to follow.",
"WarningText": "Please bare in mind that after clicking Submit, you will only be able to change your experiment after 5 days.", "WarningText": "Please bare in mind that after clicking Submit, you will only be able to change your experiment after 5 days.",
"Experiment": [{ "Experiments": [{
"Group": "Light", "Group": "Light",
"Options": ["Increase bright light exposure during the day", "Options": ["Increase bright light exposure during the day",
"Wear glasses/a sleeping mask that block blue light during the night", "Wear glasses/a sleeping mask that block blue light during the night",
...@@ -42,6 +60,11 @@ ...@@ -42,6 +60,11 @@
"Do not go to bed unless you are tired. If you are not, relax with a bath/ by reading a book before bed", "Do not go to bed unless you are tired. If you are not, relax with a bath/ by reading a book before bed",
"Go to sleep at 22:30 PM at the latest"] "Go to sleep at 22:30 PM at the latest"]
}] }]
},{
"Name": "Sleep Box 2",
"Locked": true,
"Image": null,
"Description": "Test description!"
}]
} }
] ]
\ No newline at end of file
}
\ No newline at end of file
...@@ -33,4 +33,6 @@ ...@@ -33,4 +33,6 @@
<string name="experiments_placeholder">Example of a shop item name</string> <string name="experiments_placeholder">Example of a shop item name</string>
<string name="experiments_placeholder_image">Example of image description</string> <string name="experiments_placeholder_image">Example of image description</string>
<string name="experiment_submit">Submit</string>
</resources> </resources>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment