customized digital clock in android

前端 未结 2 520
栀梦
栀梦 2021-01-28 08:46

hi i want to display time in my application in the format of HH:mm AM/PM. Digital clock includes seconds also. That is HH:mm:ss am/pm. how to avoid showing seconds. Is there any

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-28 09:36

    You have to make a clone of the file DigitalClock.java to use in your application, modify in the following manner:-

    private final static String m12 = "h:mm aa";
    private final static String m24 = "k:mm";
    

    The path of DigitalClock.java : Here

提交回复
热议问题