diff --git a/.idea/gradle.xml b/.idea/gradle.xml index a2d7c21..ae388c2 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -7,6 +7,7 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index 773fe0f..8978d23 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/src/main/java/com/example/studentcompanion/activities/CalendarActivity.java b/app/src/main/java/com/example/studentcompanion/activities/CalendarActivity.java index c0223e3..ea51df9 100644 --- a/app/src/main/java/com/example/studentcompanion/activities/CalendarActivity.java +++ b/app/src/main/java/com/example/studentcompanion/activities/CalendarActivity.java @@ -6,6 +6,7 @@ import android.app.Dialog; import android.content.Intent; import android.content.SharedPreferences; +import android.graphics.Color; import android.os.Bundle; import android.util.Log; import android.view.View; @@ -120,8 +121,10 @@ public void onClick(View v) { subname1.setText(" " + subject_name.getText().toString() + " "); if ((int) Math.ceil((targetsList.get(current_index) / 100 * totalclasses - attendedClasses) / 0.25) > 0) target.setText("Attend the next " + (int) Math.ceil((targetsList.get(current_index) / 100 * totalclasses - attendedClasses) / 0.25) + " classes to achieve " + targetValue + "% attendance."); - else + else { + target.setTextColor(Color.parseColor("#226622")); target.setText("You have achieved your target of " + targetValue + "%! Keep up the good job!"); + } dialog.dismiss(); } } @@ -233,7 +236,10 @@ else if (absent.isChecked()) { exists = 0; if((int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)>0) target.setText("Attend the next "+(int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)+" classes to achieve "+targetValue+"% attendance."); - else target.setText("You have achieved your target of "+targetValue+"%! Keep up the good job!"); + else { + target.setTextColor(Color.parseColor("#226622")); + target.setText("You have achieved your target of " + targetValue + "%! Keep up the good job!"); + } dialog.dismiss(); } } @@ -257,7 +263,10 @@ public void onClick(View v) { attendanceDataList = dbHandler.readData(); if((int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)>0) target.setText("Attend the next "+(int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)+" classes to achieve "+targetValue+"% attendance."); - else target.setText("You have achieved your target of "+targetValue+"%! Keep up the good job!"); + else { + target.setTextColor(Color.parseColor("#226622")); + target.setText("You have achieved your target of " + targetValue + "%! Keep up the good job!"); + } exists=0; present.setChecked(false); absent.setChecked(false); @@ -332,7 +341,10 @@ public void onClick(View v) { current_percentage.setText(" " + d1 + "% "); if((int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)>0) target.setText("Attend the next "+(int)Math.ceil((targetsList.get(current_index)/100*totalclasses-attendedClasses)/0.25)+" classes to achieve "+targetValue+"% attendance."); - else if(totalclasses!=0)target.setText("You have achieved your target of "+targetValue+"%! Keep up the good job!"); + else if(totalclasses!=0) { + target.setTextColor(Color.parseColor("#226622")); + target.setText("You have achieved your target of " + targetValue + "%! Keep up the good job!"); + } else target.setText("Attend the next 1 class to achieve " +targetValue+"% attendance."); at_settings.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/res/layout/eachsubject.xml b/app/src/main/res/layout/eachsubject.xml index ac89217..1970fb9 100644 --- a/app/src/main/res/layout/eachsubject.xml +++ b/app/src/main/res/layout/eachsubject.xml @@ -13,7 +13,7 @@ android:layout_marginBottom="30dp" android:layout_weight="1" android:background="@drawable/blue_rounded" - android:fontFamily="@font/prompt" + android:fontFamily="@font/prompt_semibold" android:textAlignment="center" android:textColor="@color/white" android:textSize="32sp" /> diff --git a/build.gradle b/build.gradle index 1454d1b..3a432e7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '8.0.1' apply false - id 'com.android.library' version '8.0.1' apply false + id 'com.android.application' version '8.1.1' apply false + id 'com.android.library' version '8.1.1' apply false } \ No newline at end of file