Methods Summary |
---|
public static final void | applyAlphaAnimation(android.widget.ViewFlipper v)
AlphaAnimation in = new AlphaAnimation(0.0f, 1.0f);
in.setStartOffset(0);
in.setDuration(500);
AlphaAnimation out = new AlphaAnimation(1.0f, 0.0f);
out.setStartOffset(0);
out.setDuration(500);
v.setInAnimation(in);
v.setOutAnimation(out);
|
public static java.lang.String | formatMonthYear(android.text.format.Time time)Formats the given Time object so that it gives the month and year
(for example, "September 2007").
Resources res = Resources.getSystem();
return time.format(res.getString(com.android.internal.R.string.month_year));
|
public static java.lang.String | formatNth(int nth)
return "the " + englishNthDay[nth];
|
static void | setTimeToStartOfDay(android.text.format.Time time)Sets the time to the beginning of the day (midnight) by clearing the
hour, minute, and second fields.
time.second = 0;
time.minute = 0;
time.hour = 0;
|
public static void | startActivity(android.content.Context context, java.lang.String className, long time)
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClassName(context, className);
intent.putExtra(EVENT_BEGIN_TIME, time);
context.startActivity(intent);
|
public static final android.text.format.Time | timeFromIntent(android.content.Intent intent)
Time time = new Time();
time.set(timeFromIntentInMillis(intent));
return time;
|
public static final long | timeFromIntentInMillis(android.content.Intent intent)If the given intent specifies a time (in milliseconds since the epoch),
then that time is returned. Otherwise, the current time is returned.
// If the time was specified, then use that. Otherwise, use the current time.
long millis = intent.getLongExtra(EVENT_BEGIN_TIME, -1);
if (millis == -1) {
millis = System.currentTimeMillis();
}
return millis;
|