I have the following code:
nameOfInf.setOnFocusChangeListener(new OnFocusChangeListener() {
if (strTollAmount.length() > 0) {
nameOfInf.setBackgroundColor(getResources().getColor(android.R.color.white));
nameOfInf.setTextColor(getResources().getColor(android.R.color.black));
}
});
tollAmount.setOnFocusChangeListener(new OnFocusChangeListener() {
if (strInfName.length() > 0) {
tollAmount.setBackgroundColor(getResources().getColor(android.R.color.white));
tollAmount.setTextColor(getResources().getColor(android.R.color.black));
}
});
The function checks to see if the value on the textbox is anything other than empty or null. So if the user enters something in the text box the background and foreground color should change. But that's not happening. Any idea how to edit it?