[1.0.11] fix(watch):
- WatchItemFragment: 增加对 latest/max/min 为 0 的判断 - 空值或零值统一显示 "--分钟",修复之前错误显示时间转换结果的问题 - 更新首页头部图标资源 icon_home_head.png
This commit is contained in:
@@ -129,23 +129,23 @@ class WatchItemFragment :
|
|||||||
mBinding.watchLeftValue.text = "--"
|
mBinding.watchLeftValue.text = "--"
|
||||||
mBinding.watchRightValue.text = "--"
|
mBinding.watchRightValue.text = "--"
|
||||||
} else {
|
} else {
|
||||||
if (TextUtils.isEmpty(bean.latest)) {
|
if (TextUtils.isEmpty(bean.latest)||bean.latest.floatToInt()==0) {
|
||||||
mBinding.watchValue.text = "--"
|
mBinding.watchValue.text = "--分钟"
|
||||||
} else {
|
} else {
|
||||||
mBinding.watchValue.text =
|
mBinding.watchValue.text =
|
||||||
DateUtil.timeDiff(bean.latest!!.floatToInt().toLong() * 1000 * 60)
|
DateUtil.timeDiff(bean.latest!!.floatToInt().toLong() * 1000 * 60)
|
||||||
.orEmptyDefault()
|
.orEmptyDefault()
|
||||||
}
|
}
|
||||||
if (TextUtils.isEmpty(bean.max)) {
|
if (TextUtils.isEmpty(bean.max)||bean.max.floatToInt()==0) {
|
||||||
mBinding.watchLeftValue.text = "--"
|
mBinding.watchLeftValue.text = "--分钟"
|
||||||
} else {
|
} else {
|
||||||
mBinding.watchLeftValue.text =
|
mBinding.watchLeftValue.text =
|
||||||
DateUtil.timeDiff(bean.max!!.floatToInt().toLong() * 1000 * 60)
|
DateUtil.timeDiff(bean.max!!.floatToInt().toLong() * 1000 * 60)
|
||||||
.orEmptyDefault()
|
.orEmptyDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TextUtils.isEmpty(bean.min)) {
|
if (TextUtils.isEmpty(bean.min)||bean.min.floatToInt()==0) {
|
||||||
mBinding.watchRightValue.text = "--"
|
mBinding.watchRightValue.text = "--分钟"
|
||||||
} else {
|
} else {
|
||||||
mBinding.watchRightValue.text =
|
mBinding.watchRightValue.text =
|
||||||
DateUtil.timeDiff(bean.min!!.floatToInt().toLong() * 1000 * 60)
|
DateUtil.timeDiff(bean.min!!.floatToInt().toLong() * 1000 * 60)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 86 KiB |
@@ -84,7 +84,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="24dp"
|
android:layout_marginLeft="24dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="6dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ ext {
|
|||||||
minSdkVersion = 26
|
minSdkVersion = 26
|
||||||
targetSdkVersion = 32
|
targetSdkVersion = 32
|
||||||
compileSdkVersion = 33
|
compileSdkVersion = 33
|
||||||
versionCode = 1010
|
versionCode = 1011
|
||||||
versionName = "1.0.10"
|
versionName = "1.0.11"
|
||||||
//Dependencies
|
//Dependencies
|
||||||
junitVersion = "4.12"
|
junitVersion = "4.12"
|
||||||
lifecycleVersion = "2.6.0-alpha01"
|
lifecycleVersion = "2.6.0-alpha01"
|
||||||
|
|||||||
Reference in New Issue
Block a user