Code example for InvalidPreferencesFormatException

0
		if(textSizeString == null){
			throw new NullTextSizeAttributeException(); 
		} 
		 
		if(!textSizeString.matches(pattern))
			throw new InvalidPreferencesFormatException("Error: This type not allowed (at " + (isTitle ? "title_" : "summary_") + "text_size; acceptable units are dp, dip, or px)");
		 
		float num = Float.parseFloat(textSizeString.replaceAll("(dp|px|dip){1}$", ""));
		String type = textSizeString.replaceAll("^\\d+(\\.\\d+|)", "");
		 
		if(type == "px")
			return density / num;
		else 
			return num;
	} 
	 
	public int getCurrentValue(){ 
		return mCurrentValue;
	} 
	 
Experience pair programming with AI  Get Codota for Java