DateTime startDate8 = DateTime.now();
DateTime endDate8 = new DateTime(2014, 11, 5, 15, 0);
Period period8 = new Period(startDate8, endDate8, PeriodType.dayTime());
PeriodFormatter formatter8 = new PeriodFormatterBuilder()
.appendMinutes()
.toFormatter();
tw.setText(String.valueOf(formatter8.print(period8)));
My android app.
if tw is empty;
tw="00"
if tw is one-digit text, one-digit value = "x";
tw = "0x"
tw is text in TextView. i want write "00" to tw when tw was empty i want write prefix "0" to tw when tw was one-digit character
i explained http://i.imgur.com/5wBmMI9.png
if(tws.getText().toString().isEmpty()){
tw.setText("00")
}
if(tws.getText().toString().equals("x")){
tw.setText("0x")
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.