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
07b1ff40
Commit
07b1ff40
authored
May 02, 2022
by
Anuththara18
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Age Selection Screen UI Modification
parent
7365fd04
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
350 additions
and
101 deletions
+350
-101
app/src/main/java/com/anuththara18/attentionassessment/age/AgeActivity.java
...com/anuththara18/attentionassessment/age/AgeActivity.java
+226
-25
app/src/main/java/com/anuththara18/attentionassessment/gender/GenderActivity.java
...uththara18/attentionassessment/gender/GenderActivity.java
+23
-9
app/src/main/java/com/anuththara18/attentionassessment/language/LanguageActivity.java
...hara18/attentionassessment/language/LanguageActivity.java
+13
-0
app/src/main/res/drawable-nodpi/age_bunny2.png
app/src/main/res/drawable-nodpi/age_bunny2.png
+0
-0
app/src/main/res/drawable-nodpi/icon4.png
app/src/main/res/drawable-nodpi/icon4.png
+0
-0
app/src/main/res/drawable-nodpi/icon5.png
app/src/main/res/drawable-nodpi/icon5.png
+0
-0
app/src/main/res/drawable-nodpi/icon6.png
app/src/main/res/drawable-nodpi/icon6.png
+0
-0
app/src/main/res/drawable-nodpi/icon7.png
app/src/main/res/drawable-nodpi/icon7.png
+0
-0
app/src/main/res/drawable-nodpi/stick2.png
app/src/main/res/drawable-nodpi/stick2.png
+0
-0
app/src/main/res/layout/activity_age.xml
app/src/main/res/layout/activity_age.xml
+84
-67
app/src/main/res/values-si/strings(si).xml
app/src/main/res/values-si/strings(si).xml
+2
-0
app/src/main/res/values/strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/com/anuththara18/attentionassessment/age/AgeActivity.java
View file @
07b1ff40
This diff is collapsed.
Click to expand it.
app/src/main/java/com/anuththara18/attentionassessment/gender/GenderActivity.java
View file @
07b1ff40
...
@@ -17,6 +17,7 @@ import android.widget.Button;
...
@@ -17,6 +17,7 @@ import android.widget.Button;
import
android.widget.ImageButton
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.anuththara18.attentionassessment.R
;
import
com.anuththara18.attentionassessment.R
;
import
com.anuththara18.attentionassessment.age.AgeActivity
;
import
com.anuththara18.attentionassessment.age.AgeActivity
;
...
@@ -30,7 +31,7 @@ public class GenderActivity extends AppCompatActivity {
...
@@ -30,7 +31,7 @@ public class GenderActivity extends AppCompatActivity {
ImageView
girl_img
,
boy_img
;
ImageView
girl_img
,
boy_img
;
TextView
boy_txt
,
girl_txt
,
selectGender
;
TextView
boy_txt
,
girl_txt
,
selectGender
;
public
static
int
gender
=
2
;
public
static
int
gender
=
0
;
int
click
=
1
;
int
click
=
1
;
MediaPlayer
mp
;
MediaPlayer
mp
;
...
@@ -60,11 +61,18 @@ public class GenderActivity extends AppCompatActivity {
...
@@ -60,11 +61,18 @@ public class GenderActivity extends AppCompatActivity {
boy_txt
.
setText
(
LanguageSetter
.
getresources
().
getString
(
R
.
string
.
boy
));
boy_txt
.
setText
(
LanguageSetter
.
getresources
().
getString
(
R
.
string
.
boy
));
selectGender
.
setText
(
LanguageSetter
.
getresources
().
getString
(
R
.
string
.
gender
));
selectGender
.
setText
(
LanguageSetter
.
getresources
().
getString
(
R
.
string
.
gender
));
// initially
if
(
gender
==
1
)
{
boy_img
.
setImageAlpha
(
127
);
boy_txt
.
setAlpha
(
0.5f
);
girl_img
.
setImageAlpha
(
255
);
girl_txt
.
setAlpha
(
1
f
);
}
else
if
(
gender
==
2
)
{
girl_img
.
setImageAlpha
(
127
);
girl_img
.
setImageAlpha
(
127
);
girl_txt
.
setAlpha
(
0.5f
);
girl_txt
.
setAlpha
(
0.5f
);
boy_img
.
setImageAlpha
(
255
);
boy_img
.
setImageAlpha
(
255
);
boy_txt
.
setAlpha
(
1
f
);
boy_txt
.
setAlpha
(
1
f
);
}
final
Handler
handler
=
new
Handler
();
final
Handler
handler
=
new
Handler
();
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
...
@@ -173,10 +181,16 @@ public class GenderActivity extends AppCompatActivity {
...
@@ -173,10 +181,16 @@ public class GenderActivity extends AppCompatActivity {
@Override
@Override
public
void
onClick
(
View
view
)
{
public
void
onClick
(
View
view
)
{
if
(
gender
==
0
)
{
Toast
.
makeText
(
getApplicationContext
(),
LanguageSetter
.
getresources
().
getString
(
R
.
string
.
gendernull
),
Toast
.
LENGTH_SHORT
).
show
();
}
else
{
finish
();
finish
();
Intent
intent
=
new
Intent
(
GenderActivity
.
this
,
AgeActivity
.
class
);
Intent
intent
=
new
Intent
(
GenderActivity
.
this
,
AgeActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
}
}
}
});
});
previous
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
previous
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
...
...
app/src/main/java/com/anuththara18/attentionassessment/language/LanguageActivity.java
View file @
07b1ff40
...
@@ -64,6 +64,19 @@ public class LanguageActivity extends AppCompatActivity {
...
@@ -64,6 +64,19 @@ public class LanguageActivity extends AppCompatActivity {
int
bt_notes_blink
=
0
;
int
bt_notes_blink
=
0
;
if
(
text
.
equals
(
"English"
)){
sinhala_btn
.
setImageAlpha
(
127
);
sinhala_txt_btn
.
setAlpha
(
0.5f
);
english_btn
.
setImageAlpha
(
255
);
english_txt
.
setAlpha
(
1
f
);
}
else
if
(
text
.
equals
(
"සිංහල"
)){
english_btn
.
setImageAlpha
(
127
);
english_txt
.
setAlpha
(
0.5f
);
sinhala_btn
.
setImageAlpha
(
255
);
sinhala_txt_btn
.
setAlpha
(
1
f
);
}
final
Handler
handler
=
new
Handler
();
final
Handler
handler
=
new
Handler
();
handler
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
...
...
app/src/main/res/drawable-nodpi/age_bunny2.png
0 → 100644
View file @
07b1ff40
169 KB
app/src/main/res/drawable-nodpi/icon4.png
0 → 100644
View file @
07b1ff40
113 KB
app/src/main/res/drawable-nodpi/icon5.png
0 → 100644
View file @
07b1ff40
208 KB
app/src/main/res/drawable-nodpi/icon6.png
0 → 100644
View file @
07b1ff40
46 KB
app/src/main/res/drawable-nodpi/icon7.png
0 → 100644
View file @
07b1ff40
167 KB
app/src/main/res/drawable-nodpi/stick2.png
0 → 100644
View file @
07b1ff40
108 KB
app/src/main/res/layout/activity_age.xml
View file @
07b1ff40
...
@@ -7,22 +7,26 @@
...
@@ -7,22 +7,26 @@
android:background=
"@drawable/bg2"
android:background=
"@drawable/bg2"
tools:context=
".age.AgeActivity"
>
tools:context=
".age.AgeActivity"
>
<
TextView
<
ImageButton
android:id=
"@+id/previous"
android:id=
"@+id/previous"
android:layout_width=
"wrap_content"
android:layout_width=
"50dp"
android:layout_height=
"wrap_content"
android:layout_height=
"50dp"
android:layout_marginTop=
"30dp"
android:layout_marginLeft=
"20dp"
android:drawableStart=
"@drawable/icon_left"
android:layout_marginTop=
"20dp"
android:drawableTint=
"@color/black"
android:background=
"@drawable/left_btn"
android:fontFamily=
"@font/poppins_medium"
android:gravity=
"center"
android:paddingLeft=
"30dp"
android:text=
"@string/previous"
android:textColor=
"@color/black"
android:textSize=
"16dp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageButton
android:id=
"@+id/next"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_marginRight=
"20dp"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/right_btn"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
<TextView
android:id=
"@+id/selectAge"
android:id=
"@+id/selectAge"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -40,76 +44,89 @@
...
@@ -40,76 +44,89 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
<ImageView
android:id=
"@+id/next"
android:id=
"@+id/bunny_img4"
android:layout_width=
"wrap_content"
android:layout_width=
"200dp"
android:layout_height=
"wrap_content"
android:layout_height=
"170dp"
android:layout_marginTop=
"30dp"
android:layout_marginStart=
"10dp"
android:drawableEnd=
"@drawable/icon_right"
android:layout_marginTop=
"70dp"
android:drawableTint=
"@color/black"
android:src=
"@drawable/age_bunny"
android:fontFamily=
"@font/poppins_medium"
app:layout_constraintStart_toStartOf=
"parent"
android:gravity=
"center"
android:paddingRight=
"30dp"
android:text=
"@string/next"
android:textColor=
"@color/black"
android:textSize=
"16dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
<ImageView
android:id=
"@+id/imageView"
android:id=
"@+id/bunny_img5"
android:layout_width=
"match_parent"
android:layout_width=
"200dp"
android:layout_height=
"125dp"
android:layout_height=
"170dp"
android:layout_marginBottom=
"-8dp"
android:layout_marginStart=
"180dp"
android:src=
"@drawable/stick"
android:layout_marginBottom=
"10dp"
android:src=
"@drawable/age_bunny2"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
/>
app:layout_constraintStart_toStartOf=
"parent"
/>
<ImageView
<ImageView
android:id=
"@+id/bunny_img"
android:id=
"@+id/bunny_img6"
android:layout_width=
"220dp"
android:layout_width=
"200dp"
android:layout_height=
"190dp"
android:layout_height=
"170dp"
android:layout_marginStart=
"40dp"
android:layout_marginStart=
"350dp"
android:layout_marginBottom=
"108dp"
android:src=
"@drawable/age_bunny"
android:src=
"@drawable/age_bunny"
app:layout_constraintBottom_toBottomOf=
"parent"
android:layout_marginTop=
"75dp"
app:layout_constraintStart_toStartOf=
"parent"
/>
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<
Text
View
<
Image
View
android:id=
"@+id/
age_txt
"
android:id=
"@+id/
bunny_img7
"
android:layout_width=
"
54
dp"
android:layout_width=
"
200
dp"
android:layout_height=
"1
13
dp"
android:layout_height=
"1
70
dp"
android:layout_margin
Start=
"128
dp"
android:layout_margin
End=
"10
dp"
android:layout_marginBottom=
"10dp"
android:layout_marginBottom=
"10dp"
android:fontFamily=
"@font/poppins_bold"
android:src=
"@drawable/age_bunny2"
android:text=
"4"
android:textColor=
"@color/black"
android:textSize=
"78dp"
android:textStyle=
"bold"
app:layout_constraintBottom_toBottomOf=
"@+id/bunny_img"
app:layout_constraintStart_toStartOf=
"@+id/bunny_img"
/>
<ImageButton
android:id=
"@+id/right_btn"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_marginEnd=
"18dp"
android:layout_marginBottom=
"25dp"
android:background=
"@drawable/right_btn"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
/>
app:layout_constraintEnd_toEndOf=
"parent"
/>
<ImageButton
<ImageView
android:id=
"@+id/left_btn"
android:id=
"@+id/icon4"
android:layout_width=
"80dp"
android:layout_height=
"80dp"
android:layout_marginEnd=
"20dp"
android:src=
"@drawable/icon4"
app:layout_constraintBottom_toBottomOf=
"@+id/bunny_img4"
app:layout_constraintEnd_toEndOf=
"@+id/bunny_img4"
app:layout_constraintTop_toTopOf=
"@+id/bunny_img4"
app:layout_constraintVertical_bias=
"0.811"
/>
<ImageView
android:id=
"@+id/icon5"
android:layout_width=
"50dp"
android:layout_width=
"50dp"
android:layout_height=
"50dp"
android:layout_height=
"50dp"
android:layout_marginStart=
"18dp"
android:layout_marginStart=
"35dp"
android:layout_marginBottom=
"25dp"
android:src=
"@drawable/icon5"
android:background=
"@drawable/left_btn"
app:layout_constraintBottom_toBottomOf=
"@+id/bunny_img5"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"@+id/bunny_img5"
app:layout_constraintStart_toStartOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"@+id/bunny_img5"
app:layout_constraintVertical_bias=
"0.741"
/>
<ImageView
android:id=
"@+id/icon6"
android:layout_width=
"85dp"
android:layout_height=
"85dp"
android:layout_marginEnd=
"16dp"
android:src=
"@drawable/icon6"
app:layout_constraintBottom_toBottomOf=
"@+id/bunny_img6"
app:layout_constraintEnd_toEndOf=
"@+id/bunny_img6"
app:layout_constraintTop_toTopOf=
"@+id/bunny_img6"
app:layout_constraintVertical_bias=
"0.847"
/>
<ImageView
android:id=
"@+id/icon7"
android:layout_width=
"55dp"
android:layout_height=
"55dp"
android:layout_marginStart=
"28dp"
android:src=
"@drawable/icon7"
app:layout_constraintBottom_toBottomOf=
"@+id/bunny_img7"
app:layout_constraintStart_toStartOf=
"@+id/bunny_img7"
app:layout_constraintTop_toTopOf=
"@+id/bunny_img7"
app:layout_constraintVertical_bias=
"0.765"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values-si/strings(si).xml
View file @
07b1ff40
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
<string
name=
"consentForm"
>
පර්යේෂණ අධ්යයනයකට සහභාගී වීමට කැමැත්ත දක්වන පෝරමය
</string>
<string
name=
"consentForm"
>
පර්යේෂණ අධ්යයනයකට සහභාගී වීමට කැමැත්ත දක්වන පෝරමය
</string>
<string
name=
"clear"
>
මකා දමන්න
</string>
<string
name=
"clear"
>
මකා දමන්න
</string>
<string
name=
"save"
>
සුරකින්න
</string>
<string
name=
"save"
>
සුරකින්න
</string>
<string
name=
"agenull"
>
කරුණාකර වයස තෝරන්න
</string>
<string
name=
"gendernull"
>
කරුණාකර ස්ත්රී පුරුෂ භාවය තෝරන්න
</string>
<!-- Login Screen -->
<!-- Login Screen -->
<string
name=
"welcome"
>
ආයුබෝවන්!
</string>
<string
name=
"welcome"
>
ආයුබෝවන්!
</string>
...
...
app/src/main/res/values/strings.xml
View file @
07b1ff40
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
<string
name=
"consentForm"
>
Consent Form To Participate in a Research Study
</string>
<string
name=
"consentForm"
>
Consent Form To Participate in a Research Study
</string>
<string
name=
"clear"
>
Clear
</string>
<string
name=
"clear"
>
Clear
</string>
<string
name=
"save"
>
Save
</string>
<string
name=
"save"
>
Save
</string>
<string
name=
"agenull"
>
Please select the age
</string>
<string
name=
"gendernull"
>
Please select the gender
</string>
<!-- Login Screen -->
<!-- Login Screen -->
<string
name=
"welcome"
>
Welcome!
</string>
<string
name=
"welcome"
>
Welcome!
</string>
...
...
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