Skip to content

Commit

Permalink
Rename InputWatcher to InputLayoutErrorClearer to make its purpose mo…
Browse files Browse the repository at this point in the history
…re evident.
  • Loading branch information
rivaldi8 committed Feb 22, 2016
1 parent 62e0c88 commit a0b817e
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Currency;
import java.util.Locale;

import butterknife.Bind;
import butterknife.ButterKnife;
Expand Down Expand Up @@ -108,7 +107,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
mConvertedAmountCurrencyLabel.setText(mTargetCurrency.getCurrencyCode());

mSampleExchangeRate.setText("e.g. 1 " + fromCurrency.getCurrencyCode() + " = " + " x.xx " + mTargetCurrency.getCurrencyCode());
final InputWatcher textChangeListener = new InputWatcher();
final InputLayoutErrorClearer textChangeListener = new InputLayoutErrorClearer();

CommoditiesDbAdapter commoditiesDbAdapter = CommoditiesDbAdapter.getInstance();
String commodityUID = commoditiesDbAdapter.getCommodityUID(fromCurrency.getCurrencyCode());
Expand Down Expand Up @@ -235,17 +234,16 @@ private void transferFunds() {
dismiss();
}

private class InputWatcher implements TextWatcher {

/**
* Hides the error message from mConvertedAmountInputLayout and mExchangeRateInputLayout
* when the user edits their content.
*/
private class InputLayoutErrorClearer implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {

}
public void beforeTextChanged(CharSequence s, int start, int count, int after) { }

@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {

}
public void onTextChanged(CharSequence s, int start, int before, int count) { }

@Override
public void afterTextChanged(Editable s) {
Expand Down

0 comments on commit a0b817e

Please sign in to comment.