import android.annotation.SuppressLint;
import android.graphics.Typeface;
import android.text.Editable;
+import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.Gravity;
import android.view.View;
final View focusedView = tvTransactionComment.findFocus();
tvTransactionComment.setTypeface(null,
(focusedView == tvTransactionComment) ? Typeface.NORMAL : Typeface.ITALIC);
- tvTransactionComment.setVisibility(((focusedView != tvTransactionComment) &&
- Misc.isEmptyOrNull(transactionComment))
- ? View.INVISIBLE : View.VISIBLE);
+ tvTransactionComment.setVisibility(
+ ((focusedView != tvTransactionComment) && TextUtils.isEmpty(transactionComment))
+ ? View.INVISIBLE : View.VISIBLE);
};
hintObserver = hint -> {
tvComment.setTypeface(null,
(focusedView == tvComment) ? Typeface.NORMAL : Typeface.ITALIC);
tvComment.setVisibility(
- ((focusedView != tvComment) && Misc.isEmptyOrNull(comment)) ? View.INVISIBLE
- : View.VISIBLE);
+ ((focusedView != tvComment) && TextUtils.isEmpty(comment)) ? View.INVISIBLE
+ : View.VISIBLE);
};
showCommentsObserver = show -> {
textColor = (alpha << 24) | (0x00ffffff & textColor);
textView.setTypeface(null, Typeface.ITALIC);
textView.setHint("");
- if (Misc.isEmptyOrNull(textView.getText())) {
+ if (TextUtils.isEmpty(textView.getText())) {
textView.setVisibility(View.INVISIBLE);
}
}