Android examples for java.util:Time
build Time String
//package com.java2s; import java.util.Calendar; public class Main { public static String buildTimeString(int[] time) { // Minute + 100 to display HH::mm instead of H:m return Integer.toString(time[0]) + ":" + Integer.toString((time[1]) + 100).substring(1); }//from ww w .ja v a2 s.c o m public static String buildTimeString(Calendar calendarTime) { // Minute + 100 to display HH::mm instead of H:m return Integer.toString(calendarTime.get(Calendar.HOUR_OF_DAY)) + ":" + Integer.toString(calendarTime.get(Calendar.MINUTE) + 100) .substring(1); } }