Android Open Source - checkit Util






From Project

Back to project page checkit.

License

The source code is released under:

GNU General Public License

If you think the Android project checkit listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * Utilities./* ww w.j a v a 2 s  .c  o  m*/
 *
 * @author  Yujian Zhang <yujian{dot}zhang[at]gmail(dot)com>
 *
 * License: 
 *   GNU General Public License v2
 *   http://www.gnu.org/licenses/gpl-2.0.html
 * Copyright (C) 2011-2012 Yujian Zhang
 */

package net.whily.android.checkit;

import java.util.Calendar;
import android.content.Context;
import android.widget.Toast;

public class Util {
  public static void toast (Context context, String text) {
    Toast.makeText(context, text, Toast.LENGTH_LONG).show();
  }

  /**
   * Return current UTC time in HHHHMMDDMMSS.
   */
  public static String timeStamp() {
    Calendar now = Calendar.getInstance();
    return String.format("%04d%02d%02d%02d%02d",
                         now.get(Calendar.YEAR),
                         now.get(Calendar.MONTH) + 1,
                         now.get(Calendar.DAY_OF_MONTH),
                         now.get(Calendar.HOUR_OF_DAY),
                         now.get(Calendar.MINUTE));
  }
}




Java Source Code List

net.whily.android.checkit.AboutActivity.java
net.whily.android.checkit.Alert.java
net.whily.android.checkit.CheckActivity.java
net.whily.android.checkit.CheckedItem.java
net.whily.android.checkit.ChecklistMetadata.java
net.whily.android.checkit.ChecklistProvider.java
net.whily.android.checkit.CustomDialogFragment.java
net.whily.android.checkit.ExternalStorage.java
net.whily.android.checkit.HomeActivity.java
net.whily.android.checkit.OnDialogDoneListener.java
net.whily.android.checkit.PromptDialogFragment.java
net.whily.android.checkit.SelectionDialogFragment.java
net.whily.android.checkit.SettingsActivity.java
net.whily.android.checkit.Util.java