代碼中比較getText()和int值,為什麼Toast信息不正確?
謝謝。
public static int mDay;
Button e01;
public static String[][] a = new String[6][7];
e02.setText("" + a[0][2]);
if(e01.getText().toString().equals(mDay))
{
e01.setTextColor(Color.parseColor("#FFBBFF"));
Toast.makeText(this, "Button2 text equals!", Toast.LENGTH_SHORT).show();
}
//// in debug mode both gives value 29
e01.getText().toString() =29
mDay=29
if(e01.getText().toString().equals(“”+mDay))