question: 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 ; }
target:  Increment the numeric badge label. If the current badge label cannot be converted to an integer value, its label will be set to "0".