【发布时间】:2020-04-04 08:08:46
【问题描述】:
我正在使用 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