I'm trying to use the DateTimeFormatter API to show a specific time in a TextView but whenever I run my app whilst my device is set to either the Arabic or Bengali language, the time always seems to show western numerals for some reason. Is this intentional, or is there something that I need to do to fix this?
Kotlin
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val localizedTimeFormatter = DateTimeFormatter.ofLocalizedTime(FormatStyle.SHORT)
val timeOpen = LocalTime.of(9, 30)
val timeClose = LocalTime.of(17, 15)
tv_time.text = (timeOpen.format(localizedTimeFormatter) +
"\n\n" + timeClose.format(localizedTimeFormatter))
}
}
Clock app (Arabic)
My app (Arabic)
Clock app (Bengali)
My app (Bengali)



