How to set TimePicker show with format 24h

前端 未结 11 997
独厮守ぢ
独厮守ぢ 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:34

    As some people have already mentioned just set the parameter to true or false.

    timePicker.setIs24HourView(true);

    You can find a complete example with source code to download from here http://www.ahotbrew.com/android-timepicker-example/

提交回复
热议问题