private void pathStyleHelper(String style,String offset){
  if (style == null) {
    return;
  }
  if (style.equals("none")) {
    strokePaint.setPathEffect(null);
    return;
  }
  StringTokenizer st=new StringTokenizer(style," ,");
  int count=st.countTokens();
  float[] intervals=new float[(count & 1) == 1 ? count * 2 : count];
  float max=0;
  float current=1f;
  int i=0;
  while (st.hasMoreTokens()) {
    intervals[i++]=current=toFloat(st.nextToken(),current);
    max+=current;
  }
  for (int start=0; i < intervals.length; i++, start++) {
    max+=intervals[i]=intervals[start];
  }
  float off=0f;
  if (offset != null) {
    try {
      off=Float.parseFloat(offset) % max;
    }
 catch (    NumberFormatException e) {
    }
  }
  strokePaint.setPathEffect(new DashPathEffect(intervals,off));
}

private void pathStyleHelper ( String style , String offset ) { if ( style == null ) { return ; } if ( style . equals ( "none" ) ) { strokePaint . setPathEffect ( null ) ; return ; } StringTokenizer st = new StringTokenizer ( style , " ," ) ; int count = st . countTokens ( ) ; float [ ] intervals = new float [ ( count & 1 ) == 1 ? count * 2 : count ] ; float max = 0 ; float current = 1f ; int i = 0 ; while ( st . hasMoreTokens ( ) ) { intervals [ i ++ ] = current = toFloat ( st . nextToken ( ) , current ) ; max += current ; } for ( int start = 0 ; i < intervals . length ; i ++ , start ++ ) { max += intervals [ i ] = intervals [ start ] ; } float off = 0f ; if ( offset != null ) { try { off = Float . parseFloat ( offset ) % max ; } catch ( NumberFormatException e ) { } } strokePaint . setPathEffect ( new DashPathEffect ( intervals , off ) ) ; }
set the path style ( if any ) stroke - dasharray = " n1 , n2 , . . . " stroke - dashoffset = n
