Q:

my code not change button text color

im using calender application im checking if button.get text is equal to current date change is color toxxx other wise show text in black color but the problem is button text will show same color either value is current date or not?? 
see this image today is 29 july 
 
29 will be shoe in 2nd button show in pink color when i click on previous week is again show 2nd button value in pink color see this 

public class HoyahCalendar extends Activity {

    public static String[][] a = new String[6][7];
    String  January="January";
    String  February="February";
    String  March="March";
    String  April="April";
    String  May="May";
    String  June="June";
    String  Jully="Jully";
    String  August="August";
    String  September="September";
    String  October="October";
    String  November="November";
    String  December="December";
    String  Monthname;

    Button e00;
    Button e01;
    Button e02;
    Button e03;
    Button e04;
    Button e05;
    Button e06;

    Calendar mCalendar = Calendar.getInstance();
    mYear = mCalendar.get(Calendar.YEAR);
    mMonth = mCalendar.get(Calendar.MONTH) + 1;
    mDay = mCalendar.get(Calendar.DAY_OF_MONTH);

    public void showOnScreen()
    {
        if (mMonth == 1) {
            Monthname="January";
        }
        else if (mMonth == 2) {
            Monthname="February";
        }
        else if (mMonth == 3) {
            Monthname="March";
        }
        else if (mMonth == 4) {
            Monthname="April";
        }
        else if (mMonth == 5) {
            Monthname="May";
        }
        else if (mMonth == 6) {
            Monthname="June";
        }
        else if (mMonth == 7) {
            Monthname="July";
        }
        else if (mMonth == 8) {
            Monthname="August";
        }
        else if (mMonth == 9) {
            Monthname="September";
        }
        else if (mMonth == 10) {
            Monthname="October";
        }
        if (mMonth == 11) {
            Monthname="November";
        }
        else if (mMonth == 12) {
            Monthname="December";
        }

        date_today.setText(Monthname + "  " +mYear);
        e00.setText("" + a[0][0]);

        if(e00.getText().toString().equals(String.valueOf(mDay)))
        // if(e00.getText().toString().equals(mDay))
        {
            e00.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button1 text equals!", Toast.LENGTH_SHORT).show();
        }
        e01.setText("" + a[0][3]);

        if(e01.getText().toString().equals(String.valueOf(mDay)))
        {
            e01.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button2 text equals!", Toast.LENGTH_SHORT).show();
        }

        e02.setText("" + a[0][2]);
        if(e02.getText().toString().equals(String.valueOf(mDay)))
        {
            e02.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button3 text equals!", Toast.LENGTH_SHORT).show();
        }
        else
        {
            e02.setTextColor(Color.parseColor("#000000"));
        }

        e03.setText("" + a[0][3]);
        if(Integer.parseInt(e03.getText().toString()) == mDay)
        {
            e03.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button4 text equals!", Toast.LENGTH_SHORT).show();
        }

        e04.setText("" + a[0][4]);
        if(e04.getText().toString().equals(String.valueOf(mDay)))
        {
            e04.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button5 text equals!", Toast.LENGTH_SHORT).show();
        }

        e05.setText("" + a[0][5]);
        if(e05.getText().toString().equals(String.valueOf(mDay)))
        {
            e05.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button6 text equals!", Toast.LENGTH_SHORT).show();
        }

        e06.setText("" + a[0][6]);
        if(e06.getText().toString().equals(String.valueOf(mDay)))
        {
            e06.setTextColor(Color.parseColor("#FFBBFF"));
            Toast.makeText(this, "Button7 text equals!", Toast.LENGTH_SHORT).show();
        }
    }

    public void CalculateCalendar(int month_no, int week_no, int month_days)
    {
        int i, s, targetRow = 0;
        int currentDay;
        if (this.mDay == 0) {
            currentDay= HoyahCalendar.mDay;
        } else {
            currentDay = this.mDay;
        }
        //String[][] a = new String[6][7];
        for (i=0;i<week_no;i++)
            HoyahCalendar.a[i/7][i%7] = "";

        for(i=week_no; i<week_no + month_days; i++) {
            s = i - week_no + 1;
            HoyahCalendar.a[i/7][i%7] = String.valueOf(s);
            if (s == currentDay && HoyahCalendar.currentIndex == -1) {
                HoyahCalendar.currentIndex = i/7;
            }
        }

        for (i=0; i<7;i++) {
            if (HoyahCalendar.a[HoyahCalendar.currentIndex][i] == null) {
                HoyahCalendar.a[0][i] = "";
            }else{
                HoyahCalendar.a[0][i] =
                    HoyahCalendar.a[HoyahCalendar.currentIndex][i];
            }
        }

        for(i=week_no+month_days; i<42; i++)
            HoyahCalendar.a[i/7][i%7] = "";
    }
}

A:

You have to reset the color to black if it is not the current day.
So for every 'if' you have to add an 'else' where you set the color to black.

