From a7446bb3995654a2c5e8d03589111d16e0734bfc Mon Sep 17 00:00:00 2001
From: liugl <liugl@sinata.cn>
Date: 星期五, 31 七月 2020 15:04:08 +0800
Subject: [PATCH] 7.31

---
 app/src/main/java/com/okgoincar/utils/UtilKt.kt |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/app/src/main/java/com/okgoincar/utils/UtilKt.kt b/app/src/main/java/com/okgoincar/utils/UtilKt.kt
index a390495..bfe0bb7 100644
--- a/app/src/main/java/com/okgoincar/utils/UtilKt.kt
+++ b/app/src/main/java/com/okgoincar/utils/UtilKt.kt
@@ -229,6 +229,11 @@
 }
 
 
+fun TextView.setDrawableNull() {
+    this.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null)
+}
+
+
 fun TextView.setDrawableBottom(drawableResourseId: Int) {
     val topAct: Drawable = context.resources.getDrawable(drawableResourseId)
     this.setCompoundDrawablesWithIntrinsicBounds(null, null, null, topAct)
@@ -243,7 +248,6 @@
     val topAct: Drawable = context.resources.getDrawable(drawableResourseId)
     this.setCompoundDrawablesWithIntrinsicBounds(null, topAct, null, null)
 }
-
 
 fun TextView.setColor(context: Context, resourse: Int) {
     this.setTextColor(ContextCompat.getColor(context, resourse))
@@ -303,12 +307,14 @@
 //    }
 //})
 
+
+
 fun getNowTimeBlack():Boolean{
     var hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY)
-    if (hour < 7 || hour >= 18){
-        return true
-    }
-    return false
+//    if (hour < 7 || hour >= 18){
+//            return true
+//    }
+    return true
 }
 
 fun toast(s:String){

--
Gitblit v1.7.1