語言

Formatter.FormatShortFileSize(Context, Int64) 方法

定義

類似 #formatFileSize,但嘗試產生較短的數字(顯示較少的精確位數)。

[Android.Runtime.Register("formatShortFileSize", "(Landroid/content/Context;J)Ljava/lang/String;", "")]
public static string? FormatShortFileSize(Android.Content.Context? context, long sizeBytes);
[<Android.Runtime.Register("formatShortFileSize", "(Landroid/content/Context;J)Ljava/lang/String;", "")>]
static member FormatShortFileSize : Android.Content.Context * int64 -> string

參數

context
Context

用來載入本地單位的上下文。 這個值可能是 Null。

sizeBytes
Int64

大小值需格式化,以位元組為單位。

傳回

格式化字串並附有數字。

屬性

備註

類似 #formatFileSize,但嘗試產生較短的數字(顯示較少的精確位數)。

Java 文件 android.text.format.Formatter.formatShortFileSize(android.content.Context, long)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於