Commit a23d0a3e authored by Anuththara18's avatar Anuththara18

Fixed Bug in Game Maps Stars & Added Video URLs

parent 0df5f15a
......@@ -28,6 +28,7 @@ import androidx.core.content.ContextCompat;
import com.anuththara18.attentionassessment.R;
import com.anuththara18.attentionassessment.home.MainFragment;
import com.anuththara18.attentionassessment.home.NavigationDrawerActivity;
import com.anuththara18.attentionassessment.language.LanguageSetter;
......
......@@ -52,7 +52,7 @@ public class NavigationDrawerActivity extends AppCompatActivity implements Navig
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_navigation_drawer);
toolbar.setNavigationIcon(null);
//toolbar.setNavigationIcon(null);
// Configure all views
this.configureToolBar();
......
......@@ -49,16 +49,16 @@ public class Map1Activity extends AppCompatActivity {
if (comp1 == 1) {
star1.setVisibility(View.VISIBLE);
}
else if (comp2 == 1){
if (comp2 == 1){
star2.setVisibility(View.VISIBLE);
}
else if (comp3 == 1){
if (comp3 == 1){
star3.setVisibility(View.VISIBLE);
}
else if (comp4 == 1){
if (comp4 == 1){
star4.setVisibility(View.VISIBLE);
}
else if (comp5 == 1){
if (comp5 == 1){
star5.setVisibility(View.VISIBLE);
}
......
......@@ -56,16 +56,16 @@ public class Map2Activity extends AppCompatActivity {
if (comp1 == 1) {
star1.setVisibility(View.VISIBLE);
}
else if (comp2 == 1){
if (comp2 == 1){
star2.setVisibility(View.VISIBLE);
}
else if (comp3 == 1){
if (comp3 == 1){
star3.setVisibility(View.VISIBLE);
}
else if (comp4 == 1){
if (comp4 == 1){
star4.setVisibility(View.VISIBLE);
}
else if (comp5 == 1){
if (comp5 == 1){
star5.setVisibility(View.VISIBLE);
}
......
......@@ -426,6 +426,7 @@ public class SelectiveAttentionGame1 extends AppCompatActivity {
}
else if (Map2Activity.level == 2){
Map2Activity.comp2 = 1;
Log.d("***************", "level 2 done");
}
else if (Map2Activity.level == 3){
Map2Activity.comp3 = 1;
......
......@@ -3,9 +3,11 @@ package com.anuththara18.attentionassessment.videos;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
......@@ -36,6 +38,13 @@ public class IntroductoryVideoLandscapeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_introductory_video);
TextView skip = findViewById(R.id.skip);
......@@ -76,14 +85,14 @@ public class IntroductoryVideoLandscapeActivity extends AppCompatActivity {
if (MainFragment.game.equals("focused")) {
if (Map1Activity.level == 1 || Map1Activity.level == 2) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/_Ob4e8Upofg\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
else if (Map1Activity.level == 5){
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/bRPtJDKBPu4\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
}
else if (MainFragment.game.equals("alternating")) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/zphdLe78ils\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
Log.i("*********************************************************Video", "Video Playing....");
......
......@@ -9,9 +9,11 @@ import android.content.Intent;
import android.graphics.Bitmap;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.WindowManager;
import android.webkit.DownloadListener;
import android.webkit.WebSettings;
import android.webkit.WebView;
......@@ -42,6 +44,13 @@ public class IntroductoryVideoPortraitActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 16) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
setContentView(R.layout.activity_introductory_video);
TextView skip = findViewById(R.id.skip);
......@@ -71,16 +80,16 @@ public class IntroductoryVideoPortraitActivity extends AppCompatActivity {
});
if (MainFragment.game.equals("focused")) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/66b8q2O5F5g\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
else if (MainFragment.game.equals("divided")) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/h6OhuRTsytc\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
else if (MainFragment.game.equals("selective")) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/Nx0ZH37J8RA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
else if (MainFragment.game.equals("sustained")) {
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/9n7kxFr-nBA\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
videoStr = "<html><body><iframe width=\"100%\" height=\"100%\" src=\"https://www.youtube.com/embed/uivJyOuy4JE\" frameborder=\"0\" allowfullscreen></iframe></body></html>";
}
Log.i("*********************************************************Video", "Video Playing....");
......
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