Commit 89ca9449 authored by Anuththara18's avatar Anuththara18

Background Music Restart

parent 051c7db1
......@@ -110,6 +110,16 @@ public class AlternatingAttentionGame1 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.alternating);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -97,6 +97,16 @@ public class DividedAttentionGame1 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.divided);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -117,6 +117,16 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.focused);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -102,6 +102,16 @@ public class FocusedAttentionGame2 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.focused);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -119,6 +119,16 @@ public class SelectiveAttentionGame1 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.selective);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
Log.d("startTime", String.valueOf(gameStart));
......
......@@ -107,6 +107,16 @@ public class SustainedAttentionGame1 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.sustained);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -103,6 +103,16 @@ public class SustainedAttentionGame2 extends AppCompatActivity {
mp = MediaPlayer.create(getApplicationContext(), R.raw.divided);
mp.start();
mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Log.d("#############", "restart");
mp.start();
}
});
long gameStart = System.currentTimeMillis();
//creating a database
......
......@@ -48,7 +48,9 @@ public class IntroductoryVideoLandscapeActivity extends AppCompatActivity {
setContentView(R.layout.activity_introductory_video);
TextView skip = findViewById(R.id.skip);
TextView loading = findViewById(R.id.loading);
skip.setText(LanguageSetter.getresources().getString(R.string.skip));
loading.setText(LanguageSetter.getresources().getString(R.string.loading));
/*
// finding videoview by its id
......
......@@ -54,7 +54,9 @@ public class IntroductoryVideoPortraitActivity extends AppCompatActivity {
setContentView(R.layout.activity_introductory_video);
TextView skip = findViewById(R.id.skip);
TextView loading = findViewById(R.id.loading);
skip.setText(LanguageSetter.getresources().getString(R.string.skip));
loading.setText(LanguageSetter.getresources().getString(R.string.loading));
skip.setOnClickListener(new View.OnClickListener() {
@Override
......
......@@ -13,11 +13,29 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:fontFamily="@font/poppins_medium"
android:fontFamily="@font/poppins_bold"
android:textStyle="bold"
android:gravity="center"
android:background="#028107"
android:text="@string/skip"
android:textColor="@color/black"
android:textColor="@color/white"
android:textSize="16dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:padding="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/loading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:fontFamily="@font/poppins_medium"
android:gravity="center"
android:text="@string/loading"
android:textColor="@color/black"
android:textSize="12dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
......@@ -23,6 +23,7 @@
<string name="req">* අවශ්යයි</string>
<string name="send">දත්ත යවන්න</string>
<string name="diagnosis">ඔබේ දරුවා අවධානය යොමු කිරිමේදී යම් දුර්වලතාවයක් පෙන්නුම් කරන්නේද?</string>
<string name="loading">වීඩියෝව පූරණය වීමට තත්පර කිහිපයක් ගතවනු ඇත...</string>
<string name="select">තෝරන්න</string>
<string name="birdselect">ඔබ වඩාත්ම කැමති චරිතය තෝරන්න</string>
......
......@@ -22,6 +22,7 @@
<string name="req">* Required</string>
<string name="send">Send Data</string>
<string name="diagnosis">Does your child show any symptoms of attention impairements?</string>
<string name="loading">The video will take few seconds to load...</string>
<string name="select">Select the</string>
<string name="birdselect">Pick your favourite character</string>
......
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