Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
20_21-J03
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
20_21-J03
20_21-J03
Commits
c9283bcc
Commit
c9283bcc
authored
Jan 18, 2021
by
Gamage B.G.N.U
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'IT17187138' into 'master'
Change DashBordHome See merge request
!52
parents
fa5ca5b3
caa503a8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
355 additions
and
8 deletions
+355
-8
app/build.gradle
app/build.gradle
+2
-1
app/src/main/java/com/elearning/probabilityandstatisticsanalyserandeducator/adaptiveLearning/DashBoardHome.java
...csanalyserandeducator/adaptiveLearning/DashBoardHome.java
+129
-1
app/src/main/res/anim/fade.xml
app/src/main/res/anim/fade.xml
+16
-0
app/src/main/res/drawable/bg_item.xml
app/src/main/res/drawable/bg_item.xml
+19
-0
app/src/main/res/drawable/bg_item_selected.xml
app/src/main/res/drawable/bg_item_selected.xml
+19
-0
app/src/main/res/drawable/btn_continue.jpg
app/src/main/res/drawable/btn_continue.jpg
+0
-0
app/src/main/res/drawable/cancel_btn.png
app/src/main/res/drawable/cancel_btn.png
+0
-0
app/src/main/res/layout/fragment_dash_board_home.xml
app/src/main/res/layout/fragment_dash_board_home.xml
+169
-5
app/src/main/res/values/styles.xml
app/src/main/res/values/styles.xml
+1
-1
No files found.
app/build.gradle
View file @
c9283bcc
...
...
@@ -38,7 +38,8 @@ android {
// python.exe file path *********** please change this according to your file path
python
{
buildPython
"C:/Users/Navod/AppData/Local/Programs/Python/Python39/python.exe"
buildPython
"C:/Users/Ruvi/AppData/Local/Programs/Python/Python39/python.exe"
}
}
...
...
app/src/main/java/com/elearning/probabilityandstatisticsanalyserandeducator/adaptiveLearning/DashBoardHome.java
View file @
c9283bcc
package
com.elearning.probabilityandstatisticsanalyserandeducator.adaptiveLearning
;
import
android.content.Intent
;
import
android.graphics.drawable.Drawable
;
import
android.os.Bundle
;
import
androidx.annotation.NonNull
;
...
...
@@ -9,11 +11,24 @@ import androidx.fragment.app.Fragment;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.animation.Animation
;
import
android.view.animation.AnimationUtils
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
com.elearning.probabilityandstatisticsanalyserandeducator.R
;
import
com.elearning.probabilityandstatisticsanalyserandeducator.UserDashBoard
;
import
static
androidx
.
appcompat
.
content
.
res
.
AppCompatResources
.
getDrawable
;
public
class
DashBoardHome
extends
Fragment
{
LinearLayout
descriptive_ststis
,
standard_dev
,
probability
,
probability_deistribu
,
z_score
,
normal_distribu
;
Button
dashbord_continur
,
dashboard_cancel
;
Animation
fade
;
static
int
SELECTED_QUESTION_TYPE
=
0
;
public
DashBoardHome
()
{
// Required empty public constructor
...
...
@@ -22,6 +37,119 @@ public class DashBoardHome extends Fragment {
@Nullable
@Override
public
View
onCreateView
(
@NonNull
LayoutInflater
inflater
,
@Nullable
ViewGroup
container
,
@Nullable
Bundle
savedInstanceState
)
{
return
inflater
.
inflate
(
R
.
layout
.
fragment_dash_board_home
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_dash_board_home
,
container
,
false
);
descriptive_ststis
=
view
.
findViewById
(
R
.
id
.
descriptive_ststis
);
standard_dev
=
view
.
findViewById
(
R
.
id
.
standard_dev
);
probability
=
view
.
findViewById
(
R
.
id
.
probability
);
probability_deistribu
=
view
.
findViewById
(
R
.
id
.
probability_deistribu
);
z_score
=
view
.
findViewById
(
R
.
id
.
z_score
);
normal_distribu
=
view
.
findViewById
(
R
.
id
.
normal_distribu
);
dashbord_continur
=
view
.
findViewById
(
R
.
id
.
dashbord_continur
);
dashboard_cancel
=
view
.
findViewById
(
R
.
id
.
dashboard_cancel
);
fade
=
AnimationUtils
.
loadAnimation
(
getContext
(),
R
.
anim
.
fade
);
dashbord_continur
.
setAlpha
(
0
);
dashboard_cancel
.
setAlpha
(
0
);
descriptive_ststis
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
1
;
descriptive_ststis
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
standard_dev
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
2
;
standard_dev
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
probability
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
3
;
probability
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
probability_deistribu
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
4
;
probability_deistribu
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
z_score
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
5
;
z_score
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
normal_distribu
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
SELECTED_QUESTION_TYPE
=
6
;
normal_distribu
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item_selected
));
dashbord_continur
.
setAlpha
(
1
);
dashboard_cancel
.
setAlpha
(
1
);
dashbord_continur
.
startAnimation
(
fade
);
}
});
dashboard_cancel
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
probability
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
standard_dev
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
descriptive_ststis
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
probability_deistribu
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
z_score
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
normal_distribu
.
setBackground
(
getDrawable
(
getContext
(),
R
.
drawable
.
bg_item
));
dashbord_continur
.
setAlpha
(
0
);
dashboard_cancel
.
setAlpha
(
0
);
}
});
dashbord_continur
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
Intent
intent
=
new
Intent
(
getContext
(),
StartingScreen
.
class
);
startActivity
(
intent
);
}
});
return
view
;
}
}
\ No newline at end of file
app/src/main/res/anim/fade.xml
0 → 100644
View file @
c9283bcc
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"600"
android:fromYDelta=
"100%p"
android:fromXDelta=
"0%p"
/>
<alpha
android:duration=
"600"
android:toAlpha=
"1"
android:fromAlpha=
"0.0"
/>
</set>
\ No newline at end of file
app/src/main/res/drawable/bg_item.xml
0 → 100644
View file @
c9283bcc
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#FFFFFF"
/>
<stroke
android:width=
"1dp"
android:color=
"#e7e7e7"
/>
<corners
android:radius=
"8dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_item_selected.xml
0 → 100644
View file @
c9283bcc
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"#FFFFFF"
/>
<stroke
android:width=
"2dp"
android:color=
"#1abc9c"
/>
<corners
android:radius=
"8dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/btn_continue.jpg
0 → 100644
View file @
c9283bcc
15 KB
app/src/main/res/drawable/cancel_btn.png
0 → 100644
View file @
c9283bcc
23.4 KB
app/src/main/res/layout/fragment_dash_board_home.xml
View file @
c9283bcc
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
tools:context=
".adaptiveLearning.DashBoardHome"
>
<!-- TODO: Update blank fragment layout -->
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:text=
"@string/hello_blank_fragment"
/>
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:layout_marginBottom=
"30dp"
android:gravity=
"center"
android:text=
"Let's Start Learning with us"
android:textColor=
"@android:color/tertiary_text_light"
android:textSize=
"22sp"
/>
</FrameLayout>
\ No newline at end of file
<LinearLayout
android:id=
"@+id/descriptive_ststis"
android:layout_marginTop=
"1dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Descriptive Statistics"
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/standard_dev"
android:layout_marginTop=
"2dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Standard Deviation"
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/probability"
android:layout_marginTop=
"2dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Probability "
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/probability_deistribu"
android:layout_marginTop=
"2dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Probability Distributions "
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/z_score"
android:layout_marginTop=
"2dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Z - score"
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<LinearLayout
android:id=
"@+id/normal_distribu"
android:layout_marginTop=
"2dp"
android:orientation=
"horizontal"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:background=
"@drawable/bg_item"
android:layout_marginRight=
"32dp"
android:layout_marginLeft=
"32dp"
android:padding=
"12dp"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"50dp"
android:layout_marginTop=
"10dp"
android:text=
"Normal distribution"
android:textColor=
"@color/colorAccent"
android:textSize=
"20dp"
>
</TextView>
</LinearLayout>
<Button
android:id=
"@+id/dashbord_continur"
android:layout_marginTop=
"20dp"
android:background=
"@drawable/btn_continue"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:layout_marginRight=
"18dp"
android:layout_marginLeft=
"18dp"
>
</Button>
<Button
android:id=
"@+id/dashboard_cancel"
android:layout_marginTop=
"10dp"
android:layout_width=
"match_parent"
android:layout_height=
"65dp"
android:layout_marginRight=
"18dp"
android:layout_marginLeft=
"18dp"
android:background=
"@drawable/cancel_btn"
>
</Button>
</LinearLayout>
\ No newline at end of file
app/src/main/res/values/styles.xml
View file @
c9283bcc
<resources>
<!-- Base application theme -->
<style
name=
"AppTheme"
parent=
"Theme.AppCompat.Light.
Dark
ActionBar"
>
<style
name=
"AppTheme"
parent=
"Theme.AppCompat.Light.
No
ActionBar"
>
<!-- Customize your them here. -->
<item
name=
"colorPrimary"
>
@color/colorPrimary
</item>
<item
name=
"colorPrimaryDark"
>
@color/colorPrimaryDark
</item>
...
...
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