Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
Research-Project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jayakody J.A.D.K.A - IT19114040
Research-Project
Commits
d060ffdc
Commit
d060ffdc
authored
May 03, 2022
by
Anuththara18
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Focused Attention - Getting stimulus & colour
parent
7116bc49
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
107 additions
and
8 deletions
+107
-8
app/src/main/java/com/anuththara18/attentionassessment/dividedattention/DACompleteScreen.java
...ttentionassessment/dividedattention/DACompleteScreen.java
+5
-1
app/src/main/java/com/anuththara18/attentionassessment/focused/FACompleteScreen.java
...thara18/attentionassessment/focused/FACompleteScreen.java
+27
-2
app/src/main/java/com/anuththara18/attentionassessment/focused/FocusedAttentionGame1.java
...18/attentionassessment/focused/FocusedAttentionGame1.java
+68
-0
app/src/main/res/drawable-nodpi/bg8.jpg
app/src/main/res/drawable-nodpi/bg8.jpg
+0
-0
app/src/main/res/drawable-nodpi/dino.png
app/src/main/res/drawable-nodpi/dino.png
+0
-0
app/src/main/res/layout/activity_alternating_attention_game1.xml
.../main/res/layout/activity_alternating_attention_game1.xml
+7
-5
No files found.
app/src/main/java/com/anuththara18/attentionassessment/dividedattention/DACompleteScreen.java
View file @
d060ffdc
...
...
@@ -177,7 +177,10 @@ public class DACompleteScreen extends AppCompatActivity {
try
{
writer
=
new
CSVWriter
(
new
FileWriter
(
csv
));
String
[]
entries
=
{
"id"
,
"child_gender"
,
"child_age"
,
"total_correct_responses"
,
"correct_responses"
,
"commission_errors"
,
"omission_errors"
,
"mean_reaction_time"
,
"total_duration"
,
"diagnosis"
};
String
[]
entries
=
{
"id"
,
"child_gender"
,
"child_age"
,
"sequence_of_responses"
,
"total_correct_responses"
,
"correct_responses"
,
"commission_errors"
,
"omission_errors"
,
"mean_reaction_time"
,
"total_duration"
,
"diagnosis"
};
writer
.
writeNext
(
entries
);
List
<
String
[]>
data
=
new
ArrayList
<
String
[]>();
...
...
@@ -188,6 +191,7 @@ public class DACompleteScreen extends AppCompatActivity {
data
.
add
(
new
String
[]{
String
.
valueOf
(
gameData
.
getId
()),
String
.
valueOf
(
String
.
valueOf
(
gameData
.
getChildID
()).
charAt
(
0
)),
String
.
valueOf
(
String
.
valueOf
(
gameData
.
getChildID
()).
charAt
(
1
)),
String
.
valueOf
(
"null"
),
String
.
valueOf
(
gameData
.
getTotalCorrectResponses
()),
String
.
valueOf
(
gameData
.
getNoOfCorrectResponses
()),
String
.
valueOf
(
gameData
.
getNoOfCommissionErrors
()),
...
...
app/src/main/java/com/anuththara18/attentionassessment/focused/FACompleteScreen.java
View file @
d060ffdc
...
...
@@ -35,6 +35,7 @@ import com.anuththara18.attentionassessment.consentform.ParentsConsentDatabaseHe
import
com.anuththara18.attentionassessment.details.ParentDetailsActivity
;
import
com.anuththara18.attentionassessment.gender.GenderActivity
;
import
com.anuththara18.attentionassessment.home.NavigationDrawerActivity
;
import
com.anuththara18.attentionassessment.map.Map1Activity
;
import
com.anuththara18.attentionassessment.selective.Selective
;
import
com.google.android.gms.tasks.OnSuccessListener
;
import
com.google.firebase.auth.FirebaseAuth
;
...
...
@@ -77,6 +78,8 @@ public class FACompleteScreen extends AppCompatActivity {
// constant code for runtime permissions
private
static
final
int
PERMISSION_REQUEST_CODE
=
200
;
String
stimulus
;
String
colour
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -176,18 +179,40 @@ public class FACompleteScreen extends AppCompatActivity {
try
{
writer
=
new
CSVWriter
(
new
FileWriter
(
csv
));
String
[]
entries
=
{
"id"
,
"child_gender"
,
"child_age"
,
"total_correct_responses"
,
"correct_responses"
,
"commission_errors"
,
"omission_errors"
,
"mean_reaction_time"
,
"total_duration"
,
"diagnosis"
};
String
[]
entries
=
{
"id"
,
"child_gender"
,
"child_age"
,
"level"
,
"stimulus"
,
"colour"
,
"sequence_of_responses"
,
"total_correct_responses"
,
"correct_responses"
,
"commission_errors"
,
"omission_errors"
,
"mean_reaction_time"
,
"total_duration"
,
"diagnosis"
};
writer
.
writeNext
(
entries
);
List
<
String
[]>
data
=
new
ArrayList
<
String
[]>();
if
(
Map1Activity
.
level
==
1
||
Map1Activity
.
level
==
2
)
{
stimulus
=
"bear head"
;
colour
=
"brown"
;
}
else
if
(
Map1Activity
.
level
==
2
||
Map1Activity
.
level
==
3
)
{
stimulus
=
FocusedAttentionGame1
.
stimulus
;
colour
=
FocusedAttentionGame1
.
colour
;
}
else
if
(
Map1Activity
.
level
==
5
)
{
stimulus
=
FocusedAttentionGame1
.
stimulus
;
colour
=
FocusedAttentionGame1
.
colour
;
}
for
(
int
i
=
0
;
i
<
dataList
.
size
();
i
++)
{
Focused
gameData
=
dataList
.
get
(
i
);
data
.
add
(
new
String
[]{
String
.
valueOf
(
gameData
.
getId
()),
String
.
valueOf
(
String
.
valueOf
(
gameData
.
getChildID
()).
charAt
(
0
)),
String
.
valueOf
(
String
.
valueOf
(
gameData
.
getChildID
()).
charAt
(
1
)),
String
.
valueOf
(
Map1Activity
.
level
),
String
.
valueOf
(
stimulus
),
String
.
valueOf
(
colour
),
String
.
valueOf
(
"null"
),
String
.
valueOf
(
gameData
.
getTotalCorrectResponses
()),
String
.
valueOf
(
gameData
.
getNoOfCorrectResponses
()),
String
.
valueOf
(
gameData
.
getNoOfCommissionErrors
()),
...
...
app/src/main/java/com/anuththara18/attentionassessment/focused/FocusedAttentionGame1.java
View file @
d060ffdc
...
...
@@ -66,6 +66,8 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
int
radomTimer
=
0
;
int
rand
=
0
;
public
static
String
stimulus
,
colour
,
sequence_of_responses
=
""
;
int
i
=
1
;
private
long
startTime
,
clickedTime
=
0
;
long
reactionTime
;
...
...
@@ -134,6 +136,31 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
//creating a database
mDatabase
=
openOrCreateDatabase
(
DATABASE_NAME
,
MODE_PRIVATE
,
null
);
if
(
AnimalChoosingActivity
.
birdSelected
==
0
)
{
stimulus
=
"monkey"
;
colour
=
"shades of brown"
;
}
else
if
(
AnimalChoosingActivity
.
birdSelected
==
1
)
{
stimulus
=
"zebra"
;
colour
=
"black & white"
;
}
else
if
(
AnimalChoosingActivity
.
birdSelected
==
4
)
{
stimulus
=
"giraffe"
;
colour
=
"yellow & brown"
;
}
else
if
(
AnimalChoosingActivity
.
birdSelected
==
9
)
{
stimulus
=
"dog"
;
colour
=
"brown orange"
;
}
else
if
(
AnimalChoosingActivity
.
birdSelected
==
5
)
{
stimulus
=
"cow"
;
colour
=
"black & white"
;
}
else
if
(
AnimalChoosingActivity
.
birdSelected
==
8
)
{
stimulus
=
"lion"
;
colour
=
"orange & brown"
;
}
List
<
Integer
>
unpickedNumbers
=
new
ArrayList
<
Integer
>();
unpickedNumbers
.
add
(
0
);
unpickedNumbers
.
add
(
1
);
...
...
@@ -325,6 +352,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView5
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setVisibility
(
View
.
INVISIBLE
);
imageView
.
setImageResource
(
images
[
rand
]);
getData
();
}
else
if
(
i
==
4
||
i
==
16
||
i
==
28
||
i
==
40
)
{
imageView2
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -334,6 +362,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView5
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setVisibility
(
View
.
INVISIBLE
);
imageView2
.
setImageResource
(
images
[
rand
]);
getData
();
}
else
if
(
i
==
6
||
i
==
18
||
i
==
30
)
{
imageView3
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -343,6 +372,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView5
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setVisibility
(
View
.
INVISIBLE
);
imageView3
.
setImageResource
(
images
[
rand
]);
getData
();
}
else
if
(
i
==
8
||
i
==
20
||
i
==
32
)
{
imageView4
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -352,6 +382,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView5
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setVisibility
(
View
.
INVISIBLE
);
imageView4
.
setImageResource
(
images
[
rand
]);
getData
();
}
else
if
(
i
==
10
||
i
==
22
||
i
==
34
)
{
imageView5
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -361,6 +392,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setVisibility
(
View
.
INVISIBLE
);
imageView5
.
setImageResource
(
images
[
rand
]);
getData
();
}
else
if
(
i
==
12
||
i
==
24
||
i
==
36
)
{
imageView6
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -370,6 +402,7 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
imageView5
.
setVisibility
(
View
.
INVISIBLE
);
imageView
.
setVisibility
(
View
.
INVISIBLE
);
imageView6
.
setImageResource
(
images
[
rand
]);
getData
();
}
}
...
...
@@ -591,6 +624,41 @@ public class FocusedAttentionGame1 extends AppCompatActivity {
}
public
void
getData
(){
if
(
rand
==
0
)
{
stimulus
=
stimulus
+
" monkey, "
;
colour
=
colour
+
" - shades of brown, "
;
}
else
if
(
rand
==
1
)
{
stimulus
=
stimulus
+
" zebra, "
;
colour
=
colour
+
" - black & white, "
;
}
else
if
(
rand
==
2
)
{
stimulus
=
stimulus
+
" elephant, "
;
colour
=
colour
+
" - grey, "
;
}
else
if
(
rand
==
3
)
{
stimulus
=
stimulus
+
" pig, "
;
colour
=
colour
+
" - pink, "
;
}
else
if
(
rand
==
4
)
{
stimulus
=
stimulus
+
" giraffe, "
;
colour
=
colour
+
" - yellow & brown, "
;
}
else
if
(
rand
==
5
)
{
stimulus
=
stimulus
+
" cow, "
;
colour
=
colour
+
" - black & white, "
;
}
else
if
(
rand
==
6
)
{
stimulus
=
stimulus
+
" horse, "
;
colour
=
colour
+
" - shades of brown, "
;
}
else
if
(
rand
==
7
)
{
stimulus
=
stimulus
+
" dino, "
;
colour
=
colour
+
" - purple & red, "
;
}
else
if
(
rand
==
8
)
{
stimulus
=
stimulus
+
" lion, "
;
colour
=
colour
+
" - orange & brown, "
;
}
else
if
(
rand
==
9
)
{
stimulus
=
stimulus
+
" dog, "
;
colour
=
colour
+
" - brown orange, "
;
}
}
private
void
getCount
()
{
if
(
AgeActivity
.
age
==
4
)
{
...
...
app/src/main/res/drawable-nodpi/bg8.jpg
View replaced file @
7116bc49
View file @
d060ffdc
75 KB
|
W:
|
H:
1.14 MB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/drawable-nodpi/dino.png
View replaced file @
7116bc49
View file @
d060ffdc
84.4 KB
|
W:
|
H:
146 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/src/main/res/layout/activity_alternating_attention_game1.xml
View file @
d060ffdc
...
...
@@ -44,7 +44,7 @@
android:fontFamily=
"@font/poppins_bold"
android:text=
"@string/altg1"
android:textAlignment=
"center"
android:textColor=
"@color/
white
"
android:textColor=
"@color/
black
"
android:textSize=
"22dp"
android:textStyle=
"bold"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -58,9 +58,10 @@
android:src=
"@drawable/walking_unicorn"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/imageView6"
app:layout_constraintHorizontal_bias=
"0.
5
"
app:layout_constraintHorizontal_bias=
"0.
762
"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.838"
/>
<pl.droidsonroids.gif.GifImageView
android:id=
"@+id/imageView2"
...
...
@@ -69,9 +70,10 @@
android:src=
"@drawable/brown_octopus"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.5"
app:layout_constraintHorizontal_bias=
"0.5
56
"
app:layout_constraintStart_toEndOf=
"@+id/imageView6"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.497"
/>
<!--
<ImageButton
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment