Java tutorial
//package com.java2s; import android.widget.TextView; public class Main { public static void formatPadWithZero(TextView txt, int number) { if (number < 10) { txt.setText("0" + number); } else { txt.setText("" + number); } } }