public static String combineExtraStyle(String style,String extraStyle){
  String res;
  if (style == null) {
    style="";
  }
 else {
    style=style.trim();
  }
  if (extraStyle == null) {
    extraStyle="";
  }
 else {
    extraStyle=extraStyle.trim();
  }
  if (style.isEmpty()) {
    if (extraStyle.startsWith("=") || extraStyle.startsWith("+")) {
      res="+" + extraStyle.substring(1);
    }
 else {
      res="+" + extraStyle;
    }
  }
 else {
    if (extraStyle.startsWith("=") || extraStyle.startsWith("+")) {
      res=style + " " + extraStyle.substring(1);
    }
 else {
      res=style + " " + extraStyle;
    }
  }
  return res;
}

public static String combineExtraStyle ( String style , String extraStyle ) { String res ; if ( style == null ) { style = "" ; } else { style = style . trim ( ) ; } if ( extraStyle == null ) { extraStyle = "" ; } else { extraStyle = extraStyle . trim ( ) ; } if ( style . isEmpty ( ) ) { if ( extraStyle . startsWith ( "=" ) || extraStyle . startsWith ( "+" ) ) { res = "+" + extraStyle . substring ( 1 ) ; } else { res = "+" + extraStyle ; } } else { if ( extraStyle . startsWith ( "=" ) || extraStyle . startsWith ( "+" ) ) { res = style + " " + extraStyle . substring ( 1 ) ; } else { res = style + " " + extraStyle ; } } return res ; }
scipio : combines an extra style ( like selected - style ) to a main style string ( like widget - style ) . < p > note : currently , the extra style is always added as an extra , and never replaces . the extra ' s prefix ( + / = ) is stripped . < p > always use this method to concatenate extra styles .
