android.content
Class Formatter
java.lang.Object
android.content.Formatter
public final class Formatter
- extends Object
Utility class to aid in formatting common values that are not covered
by the standard java.util.Formatter
|
Method Summary |
static String |
formatFileSize(Context context,
long number)
Formats a content size to be in the form of bytes, kilobytes,
megabytes, etc |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Formatter
public Formatter()
formatFileSize
public static String formatFileSize(Context context,
long number)
- Formats a content size to be in the form of bytes, kilobytes,
megabytes, etc
- Parameters:
context - Context to use to load the localized unitsnumber - size value to be formated
- Returns:
- formated string with the number
Please submit a feedback, bug or feature