android - 在 Kotlin Android 中使用 NumberFormat.getCurrency

标签 android kotlin

我需要调用这个

{private static final NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();}

在 Android 应用程序中,但我使用的是 Kotlin,但我不知道如何在 Kotlin 中执行此操作。我如何在 Kotlin 中执行此操作?

最佳答案

使用如下:

private val currencyFormat = NumberFormat.getCurrencyInstance()

关于android - 在 Kotlin Android 中使用 NumberFormat.getCurrency,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47321514/

相关文章:

android - 安卓奥利奥版收不到FCM通知信息?

java - Android登录任意asp网站

android - 如何在Android中收集多个状态流

android - Android在两个堆叠 View 旁边显示一个正方形 ImageView

android - 将数组数据作为参数传递

java - 我在 Recyclerview 中显示来自 firebase 的图像时遇到问题

java - 我的申请历史

android - 在没有自定义适配器的情况下使用Moshi解析列表

kotlin - 如何使用 Room `` `@Ignore ``` 注释忽略 kotlin 委托(delegate)属性

kotlin - 增加可变 map 的值(value)