| | |
| | | } |
| | | |
| | | |
| | | 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) |
| | |
| | | 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)) |
| | |
| | | |
| | | fun getNowTimeBlack():Boolean{ |
| | | var hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) |
| | | // if (hour < 7 || hour >= 18){ |
| | | if (hour < 7 || hour >= 12){ |
| | | if (hour < 7 || hour >= 18){ |
| | | // if (hour < 7 || hour >= 12){ |
| | | return true |
| | | } |
| | | return false |