How to set TimePicker show with format 24h

前端 未结 11 992
独厮守ぢ
独厮守ぢ 2020-12-29 18:17

I\'ve created a TimePicker in layout and I want it to show time with format 24h.

Can you help me? Thanks.

11条回答
  •  执念已碎
    2020-12-29 18:38

    By default, it displays time in the AM/PM format. If you want to change time in the 24 hour format, then you can use the setIs24HourView() method. See this link: http://www.androidaspect.com/2012/06/timepicker-view-tutorial.html

提交回复
热议问题