在我的代碼我比較button.gettext與int值都是eqyal但它不打印吐司消息。不是在比較兩個值幫助我....如何比較ibutton文本與整數?
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
其工作thnxxx – user2619496