简体   繁体   中英

Based on Hours,how can i change the color of a date of calender in java?

我是java的初学者。我在android中开发应用程序时有一个小疑问。创建了一个表名为empdet的员工详细信息表。在该表中,小时数字段必须由用户自己输入。一天中24小时。如果员工工作8小时,压延机的一天必须显示一种颜色,如果工作超过8小时,则该压光机的一天必须显示另一种颜色。例如,如果工作时间少于8小时,它必须显示另一种颜色。在我的表empdet中,使用日期值的引用来获取小时数字段。基于这些小时数,在应用程序启动时,必须用小时数的颜色查看日历的日期,以便知道他根据颜色工作了几个小时。请帮助我吗?

The calendar date is a specific type of widget, probably a TextView? If so, you use TextView.setTextColor(int color).

If it ain't a TextView, you will have to reformulate your question. Best regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM