Skip to content
Snippets Groups Projects
Commit 70dccd94 authored by George Muresan's avatar George Muresan
Browse files

Merge branches 'master' and 'withoutbit' of...

Merge branches 'master' and 'withoutbit' of https://github.com/georgemuresan/Internship into withoutbit

# Conflicts:
#	app/src/main/res/layout/questionnaire_four.xml
parent 9b01b43e
No related branches found
No related tags found
No related merge requests found
...@@ -145,12 +145,11 @@ public class FirstPage extends AppCompatActivity { ...@@ -145,12 +145,11 @@ public class FirstPage extends AppCompatActivity {
Boolean isFirstRun = getSharedPreferences("PREFERENCE", MODE_PRIVATE) Boolean isFirstRun = getSharedPreferences("PREFERENCE", MODE_PRIVATE)
.getBoolean("isFirstRun", true); .getBoolean("isFirstRun", true);
if (!isFirstRun && consent.isChecked() && bitmoji.isChecked() && !nameBox.getText().toString().equals("") && !participantID.getText().toString().equals("")) { if (!isFirstRun && consent.isChecked() && bitmoji.isChecked() && !nameBox.getText().toString().equals("") && !participantID.getText().toString().equals("")) {
//show start activity //show start activity
getSharedPreferences("PREFERENCE", MODE_PRIVATE).edit()
.putBoolean("isFirstRun", false).apply();
startActivity(new Intent(this, MainMenu.class)); startActivity(new Intent(this, MainMenu.class));
} }
......
...@@ -30,6 +30,10 @@ public class SecondPage extends AppCompatActivity { ...@@ -30,6 +30,10 @@ public class SecondPage extends AppCompatActivity {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second_page); setContentView(R.layout.activity_second_page);
getSharedPreferences("PREFERENCE", MODE_PRIVATE).edit()
.putBoolean("isFirstRun", false).apply();
SharedPreferences preferences = getSharedPreferences("bmsleep", MODE_PRIVATE); SharedPreferences preferences = getSharedPreferences("bmsleep", MODE_PRIVATE);
ImageView imageView = findViewById(R.id.imageView6); ImageView imageView = findViewById(R.id.imageView6);
imageView.setImageResource(preferences.getInt("slectedbitmoji", 0)); imageView.setImageResource(preferences.getInt("slectedbitmoji", 0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment