Show the time picker in hh:mm format

后端 未结 4 1079
醉酒成梦
醉酒成梦 2021-01-05 07:06

I have to show the time picker in hh:mm format on Click the edit text.So that I had used the below code.

MainActivity.java:

  e6.set         


        
4条回答
  •  孤城傲影
    2021-01-05 07:19

    Just set the text to "%02d:%02d" as follows:

    e6.setText(String.format("%02d:%02d", selectedHour, selectedMinute));
    

    Hope so this might help you

提交回复
热议问题