public int increment(int offset){
  CharSequence txt=getText();
  int i;
  if (txt != null) {
    try {
      i=Integer.parseInt(txt.toString());
    }
 catch (    NumberFormatException e) {
      i=0;
    }
  }
 else {
    i=0;
  }
  i=i + offset;
  setText(String.valueOf(i));
  return i;
}

public int increment ( int offset ) { CharSequence txt = getText ( ) ; int i ; if ( txt != null ) { try { i = Integer . parseInt ( txt . toString ( ) ) ; } catch ( NumberFormatException e ) { i = 0 ; } } else { i = 0 ; } i = i + offset ; setText ( String . valueOf ( i ) ) ; return i ; }
increment the numeric badge label . if the current badge label cannot be converted to an integer value , its label will be set to " 0 " .
