Get Android Time - Android java.util

Android examples for java.util:Time

Description

Get Android Time

Demo Code


//package com.java2s;
import android.text.format.Time;

public class Main {
    public static Time GetTime(long millis) {
        Time time = new Time();
        time.set(millis);//w w w .  j  a  v  a2 s .co m
        return time;
    }

    public static Time GetTime(int year, int month, int day) {
        Time time = new Time();
        time.set(day, month, year);
        return time;
    }
}

Related Tutorials