Code example for Editable

Methods: removeSpan

0
			+ Constants.THIN_SPACE + ")?\\d*(\\.\\d{0,2})?"); 
	private static Object SIGNIFICANT_SPAN = new StyleSpan(Typeface.BOLD);
	private static Object UNSIGNIFICANT_SPAN = new RelativeSizeSpan(0.85f);
 
	private static void updateSpans(final Editable s) {
		s.removeSpan(SIGNIFICANT_SPAN);
		s.removeSpan(UNSIGNIFICANT_SPAN);
 
		final Matcher m = P_SIGNIFICANT.matcher(s);
		if (m.find()) {
			final int pivot = m.group().length();
			s.setSpan(SIGNIFICANT_SPAN, 0, pivot, 0);
			if (s.length() > pivot)
				s.setSpan(UNSIGNIFICANT_SPAN, pivot, s.length(), 0);
		} 
	} 
 
	private boolean isValidAmount() { 
		final String amount = textView.getText().toString().trim();
 
		try {