在Kotlin中更改语言环境后,TextClock无法以相同的格式工作

问题描述 投票:1回答:1

我正在使用hh:mm:ss格式的TextClock来显示当前时间。但是,当我将语言环境从英语更改为西班牙语时,TextClock给出的时间格式错误,即hh:mm。这仅在Samsung Tab中发生。

<TextClock
                android:id="@+id/clockTimeTv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:fontFamily="@font/regular"
                android:text="12:58:18 PM"
                android:textColor="@color/dark_grey"
                android:textSize="@dimen/_18sdp"
                android:textStyle="bold"
                android:format12Hour="hh:mm:ss a"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>
android kotlin android-widget
1个回答
0
投票

我已经在我的三星银河选项卡s2上进行了测试,并且可以正常工作。.特定的设备设置必须存在问题,只需尝试从设置中更改语言,然后检查时区格式可能是]]

© www.soinside.com 2019 - 2024. All rights reserved.