Skip to content

Commit

Permalink
color changes
Browse files Browse the repository at this point in the history
  • Loading branch information
killerninjacat committed Sep 3, 2023
1 parent 793d4de commit 23e680f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
}
Expand Down Expand Up @@ -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();
}
}
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/eachsubject.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 23e680f

Please sign in to comment.