【发布时间】:2016-01-15 09:37:25
【问题描述】:
如何在 Android Studio 中创建一个具有固定开始时间的简单倒计时?它应该在应用程序打开后立即开始倒计时。最好的格式是 hh:mm:ss
谢谢
【问题讨论】:
标签: android android-studio countdown
如何在 Android Studio 中创建一个具有固定开始时间的简单倒计时?它应该在应用程序打开后立即开始倒计时。最好的格式是 hh:mm:ss
谢谢
【问题讨论】:
标签: android android-studio countdown
使用 Android Chronometer 类显示倒计时。
下面是示例代码:
<Chronometer
android:id="@+id/chronometer1"
android:textColor="#4169E1"
android:textSize="20dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button5"
android:layout_centerHorizontal="true"
android:layout_marginTop="50dp"
android:text="Chronometer" />
【讨论】: