Show the time picker in hh:mm format

后端 未结 4 1105
醉酒成梦
醉酒成梦 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:29

    Just use this method,

    private String getDD(int num) {
       return num > 9 ? "" + num : "0" + num;
    }
    

提交回复
热议问题