Commit c9283bcc authored by Gamage B.G.N.U's avatar Gamage B.G.N.U

Merge branch 'IT17187138' into 'master'

Change DashBordHome

See merge request !52
parents fa5ca5b3 caa503a8
......@@ -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"
}
}
......
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
<?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
<?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
<?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
<?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
<resources>
<!-- Base application theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your them here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
......
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