Back to project page android-appwidget-cirrus.
The source code is released under:
MIT License
If you think the Android project android-appwidget-cirrus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* Copyright 2014 Wayne D Grant (www.waynedgrant.com) Licensed under the MIT License */ //from w w w. j av a 2 s.c o m package com.waynedgrant.cirrus.presentation.formatters; import java.util.Locale; public class SolarPercentageFormatter { private Integer solarPercentage; public SolarPercentageFormatter(Integer solarPercentage) { this.solarPercentage = solarPercentage; } public String format() { String formatted = "--%"; if (solarPercentage != null) { formatted = String.format(Locale.US, "%1d%%", solarPercentage); } return formatted; } }